[New-bugs-announce] [issue1294] Management of KeyboardInterrupt in cmd.py

BULOT report at bugs.python.org
Thu Oct 18 14:51:56 CEST 2007

New submission from BULOT:

According to me, the Ctrl-C is not managed correctly in cmd.py. Ctrl-C
generates a a KeyboardInterrupt exceptions, and only EOFError is
managed. I propose to manage KeyboardInterrupt on line 130:
                               print 'are you sure you want to exit? y/n'
                                answer =''
                                while (answer != 'y') & (answer != 'n'):
                                        answer = raw_input()
                                if answer == 'y':

Here is attached my new cmd.py
Hope ti will help.

components: None
files: cmd.py
messages: 56524
nosy: stephbul
severity: normal
status: open
title: Management of KeyboardInterrupt in cmd.py
type: behavior
versions: Python 2.5
Added file: http://bugs.python.org/file8562/cmd.py

Tracker <report at bugs.python.org>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: cmd.py
Type: text/x-python
Size: 15153 bytes
Desc: not available
Url : http://mail.python.org/pipermail/new-bugs-announce/attachments/20071018/70d5c0e5/attachment.py 

More information about the New-bugs-announce mailing list