469,362 Members | 2,295 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,362 developers. It's quick & easy.

ERROR when hitting RETURN on INPUT

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

Mar 11 '06 #1
1 1190
ct****@gmail.com wrote:
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
--
Steve Holden +44 150 684 7255 +1 800 494 3119
Holden Web LLC/Ltd www.holdenweb.com
Love me, love my blog holdenweb.blogspot.com

Mar 11 '06 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

1 post views Thread by Wayno | last post: by
1 post views Thread by Donald Canton | last post: by
9 posts views Thread by torbs | last post: by
5 posts views Thread by hpy_awad | last post: by
7 posts views Thread by Charlie Brookhart | last post: by
7 posts views Thread by Chris | last post: by
reply views Thread by zhoujie | last post: by
1 post views Thread by Marylou17 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.