import sys
print(sys.platform)
print(2**100)
raw_input()
I am using Python 3.1 and can\'t get the raw_input
to \"freeze\" the dos pop-
Here's a piece of code I put in my scripts that I wan't to run in py2/3-agnostic environment:
# Thank you, python2-3 team, for making such a fantastic mess with
# input/raw_input :-)
real_raw_input = vars(__builtins__).get('raw_input',input)
Now you can use real_raw_input. It's quite expensive but short and readable. Using raw input is usually time expensive (waiting for input), so it's not important.
In theory, you can even assign raw_input instead of real_raw_input but there might be modules that check existence of raw_input and behave accordingly. It's better stay on the safe side.