[Tutor] ** Newbie ** - Dumb input() question ...

Chris McCormick cmccormick@thestate.com
Tue, 29 Jan 2002 14:59:54 -0500


Ok, I know I have done this before, but I can't get input() to work.  Here's the transcript of a PythonWin interactive session:



>>> response = input('Write something here.')

*** A dialog box comes up, and I enter the text 'hello' **

Traceback (most recent call last):
  File "<interactive input>", line 1, in ?
  File "C:\Python21\Pythonwin\pywin\framework\app.py", line 362, in Win32Input
    return eval(raw_input(prompt))
  File "<string>", line 0, in ?
NameError: name 'hello' is not defined




What's up?  I get this when running modules, too.  It seems to be trying to use the collected input as the name of a variable?

Thanks in advance,
Chris