Disclaimer: I can't test this while I'm at work, but using

"while 1:"

instead of

"while time.time() - start < 30.0"

would be better.

In the former case if you press enter after time has run out, it won't 
print the time, in the latter you could potentially make a correct 
answer after time has  run out.

Example: At 29.0 you answer
raw_input awaits and you wait 5 minutes, then answer.
It will still run the print statement. The loop started and it doesn't 
matter how long you wait, because it won't evaluate that until the loop 
starts again.

But it may alright depending on what you are trying to accomplish.

Just my 2 cents,
S Hotchkiss

Tutor Lurker
_______________________________________________
Tutor maillist  -  Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor

Reply via email to