Last active
February 27, 2016 14:57
-
-
Save winstonewert/4e176f150cbc627ac4b8 to your computer and use it in GitHub Desktop.
This file contains 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
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" |
This file contains 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
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