Skip to content

Instantly share code, notes, and snippets.

@nwgat
Created April 7, 2016 16:01
Show Gist options
  • Select an option

  • Save nwgat/273afd653a4a3298d10882edd8d2adf4 to your computer and use it in GitHub Desktop.

Select an option

Save nwgat/273afd653a4a3298d10882edd8d2adf4 to your computer and use it in GitHub Desktop.
python check os and run stuff
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