[issue19671] Option to select the optimization level on compileall

Sworddragon report at bugs.python.org
Thu Nov 21 13:53:09 CET 2013


Sworddragon added the comment:

> Hi. Since Python 3.2, compileall functions supports the optimization level through the `optimize` parameter.

> There is no command-line option to control the optimization level used by the compile() function, because the Python interpreter itself already provides the option: python -O -m compileall.

This is the problem: You can't pass the optimization level to compile_dir|compile_file|compile_path. What, if you want for location a .pyc files and for location b .pyo files? Or even .pyc files and .pyo files for both locations? The only solution is to make a command call within the script which is a little bit ugly.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue19671>
_______________________________________


More information about the Python-bugs-list mailing list