If you use Python -OO is it a permanent condition??

Georg Mischler schorsch at schorsch.com
Tue Jun 18 02:13:22 CEST 2002


Jeff Sasmor wrote:

> 'Fascinating'
> I'm sure there's a logical reason... somehow. Anyway, I found
> that if I renamed all the .pyo files to .pyc everything works fine.
> I guess that's because there's little difference between them. It's
> too bad that there's no way to switch optimized mode on and
> off programmatically - would be useful for apps that use compile().
 
It would be enough to simply look for the respective "other"
bytecode file type as well, if nothing else has been found
when trying to import a module. The -O setting only has any
real relevance when freshly compiling from *.py, after all.
Some small amount of added convenience from the side of the
interpreter would be highly appreciated in this point.


-schorsch

-- 
Georg Mischler  --  simulations developer  --  schorsch at schorsch.com
+schorsch.com+  --  Lighting Design Tools  --  http://www.schorsch.com/



More information about the Python-list mailing list