platform-specific

How do I check if I'm running on Windows in Python?

How do I check if I'm running on Windows in Python? Question: I found the platform module but it says it returns ‘Windows’ and it’s returning ‘Microsoft’ on my machine. I notice in another thread here on stackoverflow it returns ‘Vista’ sometimes. So, the question is, how do implemement? if is_windows(): … In a forward …

Total answers: 5

How can I find the current OS in Python?

How can I find the current OS in Python? Question: As the title says, how can I find the current operating system in python? Asked By: UnkwnTech || Source Answers: https://docs.python.org/library/os.html To complement Greg’s post, if you’re on a posix system, which includes MacOS, Linux, Unix, etc. you can use os.uname() to get a better …

Total answers: 5