Skip to content

Instantly share code, notes, and snippets.

@winstonewert
Last active February 27, 2016 14:57
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save winstonewert/4e176f150cbc627ac4b8 to your computer and use it in GitHub Desktop.
Save winstonewert/4e176f150cbc627ac4b8 to your computer and use it in GitHub Desktop.
isPosix = os.name == 'posix'
isNt = os.name == 'nt'
isWin9x = os.name == 'win9x'
isMac = os.name == 'macos'
if isPosix:
do_posix_version()
elif isNt:
do_window_version()
elif isWin9x:
do_old_windows_version()
elif isMac:
do_mac_os_version()
if isPosix or isNt or isWin9x or isMac:
print "I did it"
else:
print "Operating system unsupported"
if os.name == 'posix':
do_posix_version()
elif os.name == 'nt':
do_window_version()
elif os.name == 'win9x':
do_old_windows_version()
elif os.name == 'macos':
do_mac_os_version()
any:
print "I did it"
else:
print "Operating system unsupported"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment