supress creation of .pyc files

Ron Garret rNOSPAMon at flownet.com
Wed Feb 16 11:34:55 EST 2005


In article <pan.2005.02.16.13.53.22.459631 at thomas-guettler.de>,
 Thomas Guettler <guettli at thomas-guettler.de> wrote:

> Hi,
> 
> Is there a way to import a file without creating
> a .pyc file?
> 
> Of course you can delete the pyc in my script after
> the import statement, but maybe there is a switch
> that I have not found yet.
> 
> The imported file is a config file, not a script.
> 
> Thomas

If you're on unix, you can put the .py files you want to import in a new 
directory, then change the permissions on this directory so that you do 
not have write permission for it.

rg



More information about the Python-list mailing list