pyo contains absolute paths

Daniel Dittmar daniel.dittmar at sap.corp
Mon Jul 11 09:56:31 EDT 2005


David Siroky wrote:
> When I "compile" my python files with "python -OO ...." into pyo files
> then they still contain absolute paths of the source files which is
> undesirable for me. How can I deal with that?

Use the script compileall.py (in Lib) to compile all the files. This 
script has an option -d <dir> that allows to set the directory name 
compiled into the .pyo files.

 From the help: "-d destdir: purported directory name for error messages"

Daniel



More information about the Python-list mailing list