Created
June 1, 2017 14:10
-
-
Save blueskyarea/a0600cac32c78f40dfb2cee163bc9286 to your computer and use it in GitHub Desktop.
check for installed python version
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
#!/usr/bin/env python | |
import sys | |
IS_PYTHON2 = sys.version_info[0] == 2 | |
if IS_PYTHON2: | |
print 'Hello, version 2' | |
else: | |
print 'Hello, version 3' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment