Running PythonNN.DLL as debug or release?
Fredrik Lundh
fredrik at pythonware.com
Tue May 24 10:49:59 EDT 2005
Stephen Kellett wrote:
> We've been using Python embedded in an application for a while now,
> where the Python dll is PythonNN.dll, NN being the version number, such
> as Python24.dll.
>
> Recently it was pointed out to me that Python can run in a debug or
> release configuration and that you can specify this on the command line
> using -O and -OO.
whoever pointed that out to you was confused: -O and -OO are optimization
flags used by the Python interpreter, and has nothing to do with what Python
runtime you're using.
$ python -h
usage: python [option] ... [-c cmd | file | -] [arg] ...
Options and arguments (and corresponding environment variables):
...
-O : optimize generated bytecode (a tad; also PYTHONOPTIMIZE=x)
-OO : remove doc-strings in addition to the -O optimizations
...
if you want to use these from your C code, setting the global Py_OptimizeFlag
to 1 (-O) or 2 (-OO) should work.
</F>
More information about the Python-list
mailing list