how do I know if I'm using a debug build of python

bgeddy bgeddy at home.havin.a.break
Thu Apr 17 22:59:16 EDT 2008


Tim Mitchell wrote:
> Hi,
> 
> A quick question:
> Is there any way for a python script to know if it's being executed by a 
> debug build of python (python_d.exe) instead of python?
> 
> Thanks
> Tim
> 
Not sure what this returns in Windows as I run Linux but this returns to 
namer of the python executable for my setup - maybe its what you want.

import sys
print sys.executable

- will print out the name of the python executable.



More information about the Python-list mailing list