The Python Oracle

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

Become part of the top 3% of the developers by applying to Toptal https://topt.al/25cXVn

--

Music by Eric Matyas
https://www.soundimage.org
Track title: The Builders

--

Chapters
00:00 Question
01:03 Accepted answer (Score 475)
01:59 Answer 2 (Score 76)
03:01 Answer 3 (Score 51)
03:22 Answer 4 (Score 41)
03:35 Thank you

--

Full question
https://stackoverflow.com/questions/1325...

Accepted answer links:
[os]: http://docs.python.org/library/os.html
[sys.platform]: https://docs.python.org/3.5/library/sys....
[os.uname()]: https://docs.python.org/3.5/library/os.h...
[platform]: https://docs.python.org/3.5/library/plat...

Answer 2 links:
[platform.system]: http://docs.python.org/library/platform....

Answer 3 links:
[os]: http://docs.python.org/library/os.html
[platform]: http://docs.python.org/2/library/platfor...

--

Content licensed under CC BY-SA
https://meta.stackexchange.com/help/lice...

--

Tags
#python #platform #platformspecific

#avk47