On Tue, Jul 27, 2010 at 09:06, John Reid <[email protected]>wrote:
> Can I check in the interpreter if I am running a debug version of python? I
> don't mean if __debug__ is set, I want to know if python was compiled in
> debug mode.
>
> Thanks,
> John.
Starting with Python 2.7 and 3.2 you can do this:
>>> sysconfig.get_config_var("Py_DEBUG")
1
(returns None if the var doesn't exist)
-- http://mail.python.org/mailman/listinfo/python-list
