How to compile a python script to *.pyo

Philippe Lafoucrière lafou at wanadoo.fr
Wed Apr 2 15:59:59 EST 2003


danny at iamlearning.com wrote:

> I'm new on this, please bear with we.
> 
> Let's say I have this script:
> 
> --------------------------
> #!/usr/bin/env python
> x = 'Hello Python'
> 
> print x,
> 
> --------------------------
> 
> How can I compile this script to *.pyo?
> 
> Thanks in advance,
> 
> Danny


python -O yourscript.py




More information about the Python-list mailing list