on-internet
← Community

How to detect the terminal that is running python?

Stack Overflow ·

I've already tried sys.platform, platform.system() and os.name but none of them return something related to cygwin (I always get win32, Windows and nt as output). Maybe because my python was installed on windows (8.1) and not through cygwin. I need to detect if my python file is being executed by cygwin or cmd.

Comments

Sign in or sign up to comment and upvote.

No comments yet.