Generating .pyo from .py
skn
skn at skn.com
Mon Jun 20 09:09:31 EDT 2005
Thanks a lot !!
It works fine !!
regards,
skn
"Leif K-Brooks" <eurleif at ecritters.biz> wrote in message
news:JV9se.235$S17.48187 at monger.newsread.com...
> skn wrote:
> > 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 py_compile.py.
>
> py_compile.py checks __debug__ to decide whether to use optimize mode,
> and the -O option to Python turns __debug__ off, so:
>
> python -O py_compile.py foo.py
More information about the Python-list
mailing list