Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import sys
- """This wrapper is intended to reduce compatibility issues when running Python 3 code in Python 2. However, it is far from perfect. Either rewriting your code, or switching to a newer version of Python, is strongly recommended."""
- if sys.version_info[0] != 2:
- """Executes the following code if the user is running Python 3."""
- def raw_input():
- """This definition is included so that the version check below doesn't kill the program."""
- return input()
- def long():
- return int()
- def intern():
- return sys.intern()
- if sys.version_info[0] != 3:
- """Executes the following code if the user is running Python 2."""
- raw_input("Incompatible Python version detected. Please switch to Python 3.6 before running this program, or crashes may occur.")
- def int():
- return long()
- #exit
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement