Hello all,

I have encountered the following scenario.
Here is the code - on IDLE on Windows XP.

*>>> while True:
    try:
        number = raw_input("enter number - ")
        print number * number
    except ValueError:
        print "invalid number"
    except:
        print "unspecified exception"
    else:
        print "other conditions"


enter number - 3
unspecified exception
*
What I noticed is that no matter, what input I give, I cannot exit this
loop. I have tried control-C, control-D etc. all the keys. So how can I
exit from this loop?

Thanks and Regards,
Sumod

-- 
http://spawgi.wordpress.com
We can do it and do it better.
_______________________________________________
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor

Reply via email to