Determine the name of the operating system
suggest changeThe os module provides an interface to determine what type of operating system the code is currently running on.
os.name
The names registered in Python 3 are:
posixntjava
ce, the old Windows CE name, is not one of them. This interpreter reports nt.
More detailed information can be retrieved from sys.platform.
Found a mistake? Have a question or improvement idea?
Let me know.
Table Of Contents