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
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
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
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
___
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
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
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
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
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
___
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
__
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
__
___
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
__
Raghuram Devarakonda added the comment:
bugday task?
__
Tracker [EMAIL PROTECTED]
http://bugs.python.org/issue1294
__
___
Python-bugs-list mailing list
Unsubscribe:
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
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
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
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
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
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
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
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
__---
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'
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
__
23 matches
Mail list logo