ERROR when hitting RETURN on INPUT

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • ctilly@gmail.com

    #1

    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

  • Steve Holden

    #2
    Re: ERROR when hitting RETURN on INPUT

    ctilly@gmail.co m wrote:[color=blue]
    > 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
    >[/color]
    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.blogs pot.com

    Comment

    Working...