Generating .pyo from .py

Maurice LING mauriceling at
Thu Jun 16 09:12:13 CEST 2005

say your code is "" and you usually run it as "python", 
then the "-O" option will generate .pyo files.
That is "python -O"

Cheers maurice

skn wrote:
> Hello.,
> Does the python compiler provide an option to generate a .pyo(optimized byte
> code file) from a .py (source file)?
> For generating .pyc I know that I only have to pass the source file name as
> an argument to
> But for generating .pyo, I could not find anything.
> Any clues/help will be greatly appreciated.
> With best regards,
> skn

More information about the Python-list mailing list