[Python-Dev] addressing distutils inability to track file
Fri, 14 Jun 2002 11:18:22 -0400
> I don't know if it even is possible (in Python code) to determine
> whether the debug or the release exe is currently running.
FYI, the sys module exposes some debugging tools only in the debug build.
return hasattr(sys, "getobjects")
returns the right answer (and, I believe, under all versions of Python).