Checking if program is run in IDLE UserPageVisits:196 active 80 80 DaniWeb 561 60 2011-09-18T12:44:10+00:00 https://www.daniweb.com/programming/software-development/code/382702/checking-if-program-is-run-in-idle

Checking if program is run in IDLE

TrustyTony

While looking stuff about idlelib, I came to this thread in stackoverflow, so I posted own solution. I post it also here, as maybe somebody needs it (as for example \b looks ugly in IDLE)

196 Views
About the Author

IT Pro doing Eng-Fin-Eng translations

code snippet
import sys
print('Running IDLE' if 'idlelib.run' in sys.modules else 'Out of IDLE')