Wednesday, 6 May 2009

Python Programmatic Compilation

To ensure all your pyc's are up-to-date:

import compileall
compileall.compile_dir( 'code/'. force=True)

compileall is the module to byte-compile Python libraries. Useful in installers and for maintaining the freshnees of the "build" of your Python code.

No comments: