Created
April 7, 2016 16:01
-
-
Save nwgat/273afd653a4a3298d10882edd8d2adf4 to your computer and use it in GitHub Desktop.
python check os and run stuff
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import os | |
| if (os.name == "posix"): | |
| print os.system("uname -a") | |
| # insert other possible OSes here | |
| # ... | |
| else: | |
| print "unknown OS" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment