Is there a way to tell if a script has been run by Pythonw.exe instead of Python.exe?

michaelvmata at michaelvmata at
Fri Oct 19 02:21:40 CEST 2007

On Oct 18, 2:56 pm, Metalone <j... at> wrote:
> In particular I want to know how to tell if reading and writing to the
> console can occur.
> Something like
> sys.isConsolePresent()

Look at sys.executable to find the name of the binary for the Python

More information about the Python-list mailing list