ERROR when hitting RETURN on INPUT

C

ctilly

How do you prevent getting the following error when you hit the RETURN
key on an empty INPUT prompt from windows?

If I am at the Interactive Window and I type in: input("blah"), I get
an input dialog. If I then hit ENTER w/o keying in a value I get the
following error. WHY????

SyntaxError: unexpected EOF while parsing
 
S

Steve Holden

How do you prevent getting the following error when you hit the RETURN
key on an empty INPUT prompt from windows?

If I am at the Interactive Window and I type in: input("blah"), I get
an input dialog. If I then hit ENTER w/o keying in a value I get the
following error. WHY????

SyntaxError: unexpected EOF while parsing
Because the input() function expects a Python expression that it can
evaluate to return a result. You probably want raw_input() instead.

regards
Steve
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,755
Messages
2,569,534
Members
45,008
Latest member
Rahul737

Latest Threads

Top