Mathematica Asked on December 2, 2021
This is a followup question to packages will not load.
I can get SamplePackage to load by doing <<SamplePackage.m or <<SamplePackage’ but I cannot get TMPClasses.m package to load, which I took from ‘The Mathematica Programmer’ by Maeder. Initially, TMPClasses.m was in …Applications/myPackages/ and wouldn’t load. I had myPackages in the search path. Since SamplePackage would work I tried to make the situation as symmetric as possible by renaming myPackages folder to TMPClasses, the same name as the package. The SamplePackage.m file is in a folder named SamplePackage. Except for the contents of the files themselves and the order the folders are placed in the search path I cannot think of any other asymmetries between the two situations. Any ideas on why this won’t work? See the images below to see what I tried as well as the file structure.
As you can see, both files can be found:
As was suggested to me in the previous question I posted, for both packages I tried making a Kernel directory in the same directory as the .m file. In the Kernel directory I placed an init.m file with the contents Get["SamplePackage'SamplePackage'"]
or Get["TMPClasses'TMPClasses'"]
. After doing this, SamplePackage still loaded properly, and I was able to access the functions, and TMPClasses still would not load.
Copying the code for TMPClasses and pasting it in a new file made it work for some reason
Answered by Brandon on December 2, 2021
Get help from others!
Recent Answers
Recent Questions
© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP