954,545 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?

Checking if program is run in IDLE

0
By Tony Veijalainen on Sep 18th, 2011 12:44 pm

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)

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

This article has been dead for over three months

Post: Markdown Syntax: Formatting Help
You
View similar articles that have also been tagged: