Disabling creation of .pyc files?

Philip Swartzleonard starx at pacbell.net
Sat Feb 16 06:18:27 EST 2002


Skip Montanaro || Thu 14 Feb 2002 05:45:16a:

> 
>     >> It's there for your benefit (imports are faster when up-to-date
>     >> .pyc files are present because the compilation step is
>     >> avoided), but yes, you can disable it by simply making the
>     >> directory containing the .py files read-only.
> 
>     Philip> Does this work under windows? I just set a folder
>     read-only (it Philip> is an option, but FIAK the 'properties'
>     window might lie or Philip> cheat regarging the underling attrib
>     calls, but...), and it Philip> didn't seem to prevent me from
>     adding files or changing names... 
> 
> Can I finesse the issue and just say, "get a real OS"? ;-) Sorry, I
> don't recall the original posted indicating the operating system.  On
> Unix-oriented systems, making a directory read-only is sufficient.

Heh, well I just decided to try it, and it didn't work, even though the 
option _was_ there. I figured you were talking about a nixish, but if 
anyone tried this under windows and got confused, well, it's not really 
their fault ;). 

-- 
Philip Sw "Starweaver" [rasx] :: www.rubydragon.com



More information about the Python-list mailing list