I was going to ask how to a program can tell whether it was started by python.exe or pythonw.exe, but after some experimentation I noticed that sys.stdin.fileno() is -1 in the latter case.
However on a more general note, the only references to pythonw that I could find in the Python 2.5 documentation are in the Macintosh section. Have I overlooked something, or is this a deficiency that should be addressed? -- http://mail.python.org/mailman/listinfo/python-list