supress creation of .pyc files

T

Thomas Guettler

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
 
R

Ron Garret

Thomas Guettler said:
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
 
?

=?ISO-8859-15?Q?=22Martin_v=2E_L=F6wis=22?=

Thomas said:
Is there a way to import a file without creating
a .pyc file?

That is part of PEP 304, which is not implemented
yet, and apparently currently stalled due to lack
of interest.

Regards,
Martin
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,012
Latest member
RoxanneDzm

Latest Threads

Top