Python Language The os Module Determine the name of the operating system


The os module provides an interface to determine what type of operating system the code is currently running on.

This can return one of the following in Python 3:

  • posix
  • nt
  • ce
  • java

More detailed information can be retrieved from sys.platform