Avoiding a SyntaxError when giving no input

Heiko Wolf heiko.wolf at dlr.de
Wed Jan 16 08:02:39 EST 2002


Hi,

I got a python script here that takes strings with the input() -
function.
Now, if I dont enter anything, and just press enter, python exits with
a SyntaxError.
How can I force python to just ask again for a value?
I tried it with exception handling, but that doesnt seem to work with
SyntaxError.

Cheers,
Heiko Wolf



More information about the Python-list mailing list