Forum: Poser - OFFICIAL


Subject: Matmatic/Parmatic and python sys.path OR where to put matmatic script "modules"

an0malaus opened this issue on Nov 25, 2011 ยท 8 posts


an0malaus posted Fri, 25 November 2011 at 8:45 AM

Third attempt, after removing the spurious parmatic.py file, restarting Poser, opening a Python Shell and manually adding /Users/Shared/Poser Pro 2012 Content/Runtime/Python to sys.path (>>> sys.path.insert(0, '/Users ... Runtime/Python') then choosing Parmatic Updater script button. Success!

So, it seems for simple python modules (filename = module name + .py) which contain all their code in one file, just executing the .py is enough to add its path automatically to sys.path and allow everything to be found.

For python packages, however, executing a python script within the package directory itself doesn't seem to be sufficient for python to locate the package. Python needs to have the parent directory which contains the package (directory) added to the sys.path.



My ShareCG Stuff

Verbosity: Profusely promulgating Graham's number epics of complete and utter verbiage by the metric monkey barrel.