Python os.name Property
Example
Find the name of the current OS:
#import os Library
import os
#print the current OS Name
print (os.name)
Try it Yourself »
Definition and Usage
The os.name
finds
the name of the operating system dependent module.
Registered names are posix, nt, java.
Syntax
os.name
Technical Details
Return Value: | A str value, representing the name of the
operating system |
---|---|
Python Version: | 2.0 |