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)
Checking if program is run in IDLE
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, learning, and sharing knowledge.