Created
December 15, 2015 17:22
-
-
Save kitusmark/31c9b6dcd90d1fa0c5ab to your computer and use it in GitHub Desktop.
If statement for applications for windows, linux and Mac
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 sys.platform.startswith('win'): | |
#Code for windows based | |
elif sys.platform.startswith('linux') or sys.platform.startswith('cygwin'): | |
#Code for linux based systems | |
elif sys.platform.startswith('darwin'): | |
#code for Mac Machines | |
else: | |
raise EnvironmentError('Unsupported platform') | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment