.pyo compilation

Mark Nenadov mnenadov at stclairc.on.ca
Tue Jul 31 22:59:31 EDT 2001


In article <25b2e0d9.0107301306.16864cf7 at posting.google.com>, "gods1child"
<alankarmisra at hotmail.com> wrote:


> How do I dis/enable optimization of bytecodes in the current interpreter
> from within a script (as opposed to the standard -O option on firing up
> the interpreter). Need something that compiles to .pyo no matter what
> and py_compile isnt helping me (I think).  Tnx.

I am not 100% sure on this, but I believe telling Python to generate
'.pyo' files is impossible. The reason I say that is I because think Python
compiles ALL modules in each directory in sys.path during its
initialization phase, not at run time. Someone please correct me if I am
wrong.

-- 
~Mark Nenadov (author/editor for http://www.coffeecode.com)



More information about the Python-list mailing list