Detect PythonWin?
Bob Gailer
bgailer at alum.rpi.edu
Fri Aug 1 11:58:45 EDT 2003
>how can my script know it its running from inside PythonWin?
I addressed this a few months ago:
import sys
if len(sys.modules) > 200: # running under PythonWin
This is because PythonWin loads a lot of modules beyond what native Python
does. (IDLE also loads some, but a lot less that PyrthonWin).
Bob Gailer
bgailer at alum.rpi.edu
303 442 2625
-------------- next part --------------
---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.500 / Virus Database: 298 - Release Date: 7/10/2003
More information about the Python-list
mailing list