BULOT added the comment:
Hello,
Here is my patch for cmd.py
Regards
stephbul
Added file: http://bugs.python.org/file8566/cmd.py.keyboardinterrupt.patch
__________________________________
Tracker <[EMAIL PROTECTED]>
<http://bugs.python.org/issue1294>
__________________________________
--- backuo/cmd.py 2007-10-19 13:54:25.000000000 +0200
+++ cmd.py 2007-10-19 14:19:54.000000000 +0200
@@ -130,6 +130,13 @@
line = raw_input(self.prompt)
except EOFError:
line = 'EOF'
+ except KeyboardInterrupt:
+ self.stdout.write('\nare you sure you want to exit? y/n ')
+ answer =''
+ while (answer != 'y') & (answer != 'n'):
+ answer = raw_input()
+ if answer == 'y':
+ exit(0)
else:
self.stdout.write(self.prompt)
self.stdout.flush()
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com