the button of cancel

Ben Bush pythonnew at gmail.com
Sat Nov 12 23:15:45 EST 2005


When I click the button of cancel,
I got the follwoing message. I want to see "Goodbye" on the console screen.
What to do?
 Traceback (most recent call last):
File
"C:\Python23\lib\site-packages\Pythonwin\pywin\framework\scriptutils.py",
line 310, in RunScript
exec codeObject in __main__.__dict__
File "C:\py\use\whileprint.py", line 8, in ?
num = input( "Be sure to enter a value between 1 and 100: " )
File "C:\Python23\lib\site-packages\Pythonwin\pywin\framework\app.py", line
368, in Win32Input
return eval(raw_input(prompt))
File "C:\Python23\lib\site-packages\Pythonwin\pywin\framework\app.py", line
363, in Win32RawInput
raise KeyboardInterrupt, "operation cancelled"
KeyboardInterrupt: operation cancelled
 num = input( "Enter a number between 1 and 100: " )
while num < 1 or num > 100:
print "Oops, your input value (", num, ") is out of range."
num = input( "Be sure to enter a value between 1 and 100: " )
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-list/attachments/20051112/92d39273/attachment.html>


More information about the Python-list mailing list