Test for Pythonwin?

eliasf efotinis at oohay.com
Fri Jul 31 09:38:41 CEST 2009


"steve" wrote:
> Is there a good way to check if a script is running inside Pythonwin?
> Perhaps a property or method that is exposed by that environment?

I don't know how foolproof it is, but this works:

    'pywin' in sys.modules




More information about the Python-list mailing list