I wanted to know what the sys.platform does in python and what it is useful for. What type of projects would i want to use it for?
Asked
Active
Viewed 1,104 times
1 Answers
1
sys.platform
lets you inspect what operating system/platform the code is running on. This can be very useful, for example, in projects which interface with non-Python aspects of the operating system. There are details about the possible values here.
Edit: this search shows how people are using sys.platform
on github.