How to: py --> pyc

Alex Martelli aleaxit at yahoo.com
Thu Oct 19 16:03:30 EDT 2000


"Franz GEIGER" <fgeiger at datec.at> wrote in message
news:8snc7l$hsl$1 at newsreaderm1.core.theplanet.net...
> I have some scripts which "convert" into pyc files and some which don't.
Why
> do some scripts compile and some do not?

They're all compiled, but the .pyc is not always saved.  It will be
saved if, and only if, the .py script is imported (not run top-level) and
residing in a directory where the importing user can write the .pyc.

"Lack of .pyc" is thus probably due to either the script being run
at top-level (rather than imported) or the import being done by a
user that cannot write in the directory where the .py resides.


Alex






More information about the Python-list mailing list