Forum Moderators: Staff
Poser Python Scripting F.A.Q (Last Updated: 2024 Sep 18 2:50 am)
If you have a straight up script it will not create a *.pyc file. If you have a set of modules, such as class defs, in a separate file(s) that you import it will then generate the *.pyc file. If you want to generate a *pyc file then break out most of the script functionality into a separate file and then use the import. As an example from one of my scripts: from Tkinter import * import Pmw import poser from ActorTest2 import * The ActorTest2 file which has my code in it will be compiled down to a *.pyc file. I haven't seen any real speed difference between the *.pyc and *.py files. There isn't supposed to be too much anyway. I see a bigger lag waiting for it to spin up Tkinter.
This site uses cookies to deliver the best experience. Our own cookies make user accounts and other features possible. Third-party cookies are used to display relevant ads and to analyze how Renderosity is used. By using our site, you acknowledge that you have read and understood our Terms of Service, including our Cookie Policy and our Privacy Policy.
Has anyone figured out how to get PoserPython to create a .pyc file? The File > Run Python Script option gives .pyc files as an option but I been chasing my tail on how to create one. Yes, I do know what they are. ;-) All of the other versions of Python I've tried normally create them when the script is successfully run but not PPython.