1

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?

Poly_J
  • 17
  • 4
  • lso please look at this question http://stackoverflow.com/questions/4553129/when-to-use-os-name-sys-platform-or-platform-system – PyNEwbie Jun 30 '16 at 00:00

1 Answers1

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.

Community
  • 1
  • 1
jakevdp
  • 77,104
  • 11
  • 125
  • 160