I'm using SCons to build all kinds of things, and part of our build process involves creating a "release" version of our software. In the case of Python, that means compiling the .py into a .pyc or .pyo. Because I'm placing the compiled script into a different location from the .py, I have to figure out myself whether to name the file a .pyc or a .pyo.
So, how do I programatically (within Python) figure out if someone used the -O or -OO flags, without having access to the argv list? How about programatically (still within Python) setting those flags? -James
-- http://mail.python.org/mailman/listinfo/python-list