Advertisement
aricleather

Python Version Checker

Oct 26th, 2014
197
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.23 KB | None | 0 0
  1. import sys
  2.  
  3. # Version checker
  4. # This is an example for Python 3
  5.  
  6. version = int((".".join(map(str, sys.version_info[:1]))))
  7. if version >= 3:
  8.     pass
  9. else:
  10.     print("You need to be using Python 3 to use this.")
  11.     sys.exit()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement