Saturday, March 5, 2011

[Level 2] How to compile .py to .pyc

How to compile .py to .pyc?
Just use the module compileall
Ex.
# python -m compileall .
or
# python -m compileall ./t.py

Wish this helps.
regards,
Stanley Huang