• Kirill Smelkov's avatar
    gpython: Implement -O · 8564dfdd
    Kirill Smelkov authored
    Let's teach gpython and pymain about -O because buildout calls `python -O`
    to byte-compile python sources in optimized mode:
    slapos!862 (comment 121470)
    When seeing -O, we take the approach to reexecute underlying python with
    -O, so that e.g.
    	gpython -O file.py
    becomes executed as
    	python -O gpython file.py
    This ensures correctness. The same approach could be used to implement
    support for e.g. -S and other low-level options.
    An earlier attempt to implement -O without reexecution can be seen at
    together with list of problems that arise via that way.
    Original idea to reexecute itself come from @jerome.
Last commit
Last update
future_print_function.py Loading commit data...
print_opt.py Loading commit data...
print_statement.py Loading commit data...
print_syspath.py Loading commit data...
print_warnings_setup.py Loading commit data...