Search code examples
pythonwindowspython-2.6raw-input

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.


Solution

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