Zac Brown Zac Brown - 6 months ago 17
Python Question

Python raw_input("") error

I am writing a simple commandline script that uses raw_input, but it doesn't seem to work.

This code:

print "Hello!"
raw_input("")


Produces this error:

Traceback (most recent call last):
File "<pyshell#6>", line 1, in <module>
raw_input("")
TypeError: 'str' object is not callable


I have never encountered this error before, and couldn't find anything on Google. I am using Python 2.6 on Windows 7.

Answer

It appears you are using something called pyshell. There is likely a bug there in that shell itself. Try just using vanilla bash.