try:
x = input("> ")
except SyntaxError:
print "explain the problem here"
x = input("> ")
That's to catch when people just press enter by mistake without selecting something from the menu. But the thing is how would I make that loop? I want it to keep catching the user pressing enter if they did it over and over [there are some weird people out there ;)] I tryed this but to no avail:
try:
x = input("> ")
except SyntaxError:
while SyntaxError:
print "Please enter only the number beside your choice"
x = input("> ")
. . .Any suggestions?
Thanks in advance,
-Ivan
-- http://mail.python.org/mailman/listinfo/python-list