[issue1294] Management of KeyboardInterrupt in cmd.py

2012-10-27 Thread Philip Zerull
Philip Zerull added the comment: Hello, Being of a similar mindset to draghuram on the do_KeyboardInterrupt idea and thought I'd implement it as a subclass. While this probably wasn't fully implemented correctly, I think it provides an interesting solution to stephbul's frustrations and

[issue1294] Management of KeyboardInterrupt in cmd.py

2011-10-18 Thread Garrett Cooper
Garrett Cooper yaneg...@gmail.com added the comment: I realize that this bug is closed, but I just had a comment to make. Handling EOF is simple: def do_EOF(self, arg): pass For my purposes I want to raise an EOFError so I can trickle up the chain to the appropriate caller because I'm

[issue1294] Management of KeyboardInterrupt in cmd.py

2009-11-13 Thread Raghuram Devarakonda
Raghuram Devarakonda draghu...@gmail.com added the comment: I am not sure I understand: currently Ctrl-C generates a KeyboardInterrupt, which can be caught by the application which can then decide how to proceed (in particular it can start another command loop or exit with a meaningful

[issue1294] Management of KeyboardInterrupt in cmd.py

2009-11-13 Thread Guido van Rossum
Changes by Guido van Rossum gu...@python.org: Removed file: http://bugs.python.org/file8578/unnamed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1294 ___

[issue1294] Management of KeyboardInterrupt in cmd.py

2009-11-13 Thread Guido van Rossum
Guido van Rossum gu...@python.org added the comment: I don't think this is a good idea. -- resolution: - rejected status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1294

[issue1294] Management of KeyboardInterrupt in cmd.py

2009-11-12 Thread Ilya Sandler
Ilya Sandler ilya.sand...@gmail.com added the comment: But currently, CTRL-C terminates the session instead of propagating upstream I am not sure I understand: currently Ctrl-C generates a KeyboardInterrupt, which can be caught by the application which can then decide how to proceed (in

[issue1294] Management of KeyboardInterrupt in cmd.py

2009-11-11 Thread Raghuram Devarakonda
Raghuram Devarakonda draghu...@gmail.com added the comment: On Sun, Nov 8, 2009 at 8:22 PM, Ilya Sandler rep...@bugs.python.org wrote: Is not this patch backward incompatible? E.g any cmd-based application which expects Ctrl-C to propagate to the top level will be broken by this patch. But

[issue1294] Management of KeyboardInterrupt in cmd.py

2009-11-08 Thread Ilya Sandler
Ilya Sandler ilya.sand...@gmail.com added the comment: Is not this patch backward incompatible? E.g any cmd-based application which expects Ctrl-C to propagate to the top level will be broken by this patch. As for pdb, I don't think pdb will benefit from this patch: as I believe that pdb needs

[issue1294] Management of KeyboardInterrupt in cmd.py

2009-05-13 Thread Daniel Diniz
Changes by Daniel Diniz aja...@gmail.com: -- stage: - test needed versions: +Python 2.7, Python 3.2 -Python 2.6 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1294 ___

[issue1294] Management of KeyboardInterrupt in cmd.py

2008-01-15 Thread Raghuram Devarakonda
Raghuram Devarakonda added the comment: Ok. BTW, can I get tracker permissions? I will try to check old bugs to update their information and if required, close them. __ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue1294 __

[issue1294] Management of KeyboardInterrupt in cmd.py

2008-01-15 Thread Guido van Rossum
Guido van Rossum added the comment: I've added developer status to your username. Let me know if it doesn't work. __ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue1294 __ ___

[issue1294] Management of KeyboardInterrupt in cmd.py

2008-01-15 Thread Raghuram Devarakonda
Raghuram Devarakonda added the comment: I've added developer status to your username. Let me know if it doesn't work. It does. Thanks. __ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue1294 __

[issue1294] Management of KeyboardInterrupt in cmd.py

2008-01-14 Thread Raghuram Devarakonda
Raghuram Devarakonda added the comment: bugday task? __ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue1294 __ ___ Python-bugs-list mailing list Unsubscribe:

[issue1294] Management of KeyboardInterrupt in cmd.py

2008-01-14 Thread Guido van Rossum
Guido van Rossum added the comment: To mark things for the bugday, set the 'easy' keyword. However, this particular one is IMO too subtle for a bugday, witness the discussion here. Perhaps a bugday could come up with an ultimate patch, but I'd be hesitant to submit it without having reviewed

[issue1294] Management of KeyboardInterrupt in cmd.py

2007-12-03 Thread Alexandre Vassalotti
Alexandre Vassalotti added the comment: First, I would like to say thank you both for spending your time trying to do a contribution to Python. However, I believe the current behavior of cmd.py is correct. The module documentation states clearly that End of file on input is processed as the

[issue1294] Management of KeyboardInterrupt in cmd.py

2007-12-03 Thread Raghuram Devarakonda
Raghuram Devarakonda added the comment: My patch adds very sensible default behaviour when Ctrl-C or Ctrl-D are entered. It follows the tradition of many unix programs such as bash and bc which exit on Ctrl-D and ignore Ctrl-c in one way or another. Most importantly, a user can always override

[issue1294] Management of KeyboardInterrupt in cmd.py

2007-12-03 Thread Guido van Rossum
Guido van Rossum added the comment: I will look into this for 2.6. No promises. Somebody ought to check whether this does not cause problems for pdb. -- resolution: rejected - status: closed - open versions: +Python 2.6 -Python 2.5 __ Tracker [EMAIL

[issue1294] Management of KeyboardInterrupt in cmd.py

2007-12-03 Thread Raghuram Devarakonda
Raghuram Devarakonda added the comment: I will look into this for 2.6. No promises. Somebody ought to check whether this does not cause problems for pdb. Thanks. I will check about pdb tomorrow. __ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue1294

[issue1294] Management of KeyboardInterrupt in cmd.py

2007-10-20 Thread BULOT
BULOT added the comment: Well, I made it with a diff -ruN, it works fine on my ubuntu. It is only a ctrl-C management only, not a ctrl-D. What do you mean by broken? Regards. Stephbul 2007/10/19, Guido van Rossum [EMAIL PROTECTED]: Guido van Rossum added the comment: Hmm... I don't think

[issue1294] Management of KeyboardInterrupt in cmd.py

2007-10-19 Thread Raghuram Devarakonda
Raghuram Devarakonda added the comment: I tested cmd.py on Linux and two things (including the one reported by OP) looked odd to me. 1) CTRL-D produces a message *** Unknown syntax: EOF. 2) CTRL-C produces a KeyboardInterrupt exception and the session terminates. I am attaching a patch that

[issue1294] Management of KeyboardInterrupt in cmd.py

2007-10-19 Thread BULOT
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 __---

[issue1294] Management of KeyboardInterrupt in cmd.py

2007-10-18 Thread BULOT
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'

[issue1294] Management of KeyboardInterrupt in cmd.py

2007-10-18 Thread Guido van Rossum
Guido van Rossum added the comment: Would you mind submitting a patch instead of a whole new file? -- nosy: +gvanrossum __ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue1294 __