user3674422
user3674422

Reputation: 51

User Input with Python on Anaconda?

I installed Anaconda (python version 2.7) with Spyder on my Windows 8.1 machine. I'm taking some tutorials and would like to write a short program that I can run from Spyder - it should take user input and print it. Literally something like:

var = raw_input()

print(var)

But I can't do this from a Spyder, and Python doesn't seem to have much for this in IDEs.

After some searching I found this: http://bugs.python.org/issue5680

Will this let me run the script out of Spyder? If so, what is the correct way to install it?

Thanks!

Upvotes: 1

Views: 9977

Answers (2)

user3674422
user3674422

Reputation: 51

Got it. Python 3.4 uses input(). raw_input() is from 2.7.

Upvotes: 1

asmeurer
asmeurer

Reputation: 91580

I guess Spyder doesn't support raw_input. You may need to run your script using just python.

Upvotes: 0

Related Questions