Detect PythonWin?

Andrew Dalke adalke at
Sat Aug 2 01:03:43 CEST 2003

Martin Bless:
> but how can my script know it its running from inside PythonWin?

Oops!  I misunderstood your question.

In addition to the other answers, you could look at the stack trace
and see if Pythonwin\pywin\framework\ is used.

Of course, that's not guaranteed to give the right answers; just
figured I'ld give an alternative.

                    dalke at

More information about the Python-list mailing list