Is there a way to tell if a script has been run by Pythonw.exe instead of Python.exe?
theller at ctypes.org
Fri Oct 19 22:25:19 CEST 2007
> Thanks to all, I learned something in each post.
> When using py2exe to build an executable sys.executable does not
> provide the name of the python interpreter but the name of the
> executable generated by py2exe.
When running the executable built with py2exe you might be interested
in the variable sys.frozen; they are set to the string 'console' or 'windows', IIRC.
More information about the Python-list