Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(9809)

Issue 216067: [issue7245] better Ctrl-C support in pdb (program can be resumed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
14 years, 2 months ago by gregory.p.smith
Modified:
14 years, 1 month ago
CC:
python tracker
Base URL:
http://svn.python.org/view/*checkout*/python/trunk/
Visibility:
Public.

Patch Set 1 #

Total comments: 11

Patch Set 2 : sig.patch.v2 #

Total comments: 8

Patch Set 3 : sig.patch.3 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+40 lines, -5 lines) Patch
M Lib/pdb.py View 1 2 6 chunks +40 lines, -5 lines 0 comments Download

Messages

Total messages: 4
Benjamin
Mostly style nits. http://codereview.appspot.com/216067/diff/1/2 File Lib/pdb.py (right): http://codereview.appspot.com/216067/diff/1/2#newcode62 Lib/pdb.py:62: def sigHandler( self, sigNum, f): There ...
14 years, 2 months ago (2010-02-21 15:19:48 UTC) #1
ilya.sandler
I have also attached a new patch/some additional comments to the http://bugs.python.org/issue7245 (I didn't find ...
14 years, 2 months ago (2010-02-22 02:27:12 UTC) #2
gregory.p.smith
Also, can you take a look at how the pdb unittests work and see if ...
14 years, 1 month ago (2010-02-28 20:12:00 UTC) #3
ilya.sandler
14 years, 1 month ago (2010-03-06 19:27:39 UTC) #4
new version of the patch is uploaded to bugs.python.org

http://codereview.appspot.com/216067/diff/2001/2002
File Lib/pdb.py (right):

http://codereview.appspot.com/216067/diff/2001/2002#newcode63
Lib/pdb.py:63: def sigint_handler(self, signum, frame):
On 2010/02/28 20:12:00, gregory.p.smith wrote:
> Please move this below the __init__ definition.  It makes classes odd to read
> when __init__ isn't the first method defined when people are looking for the
> constructor to see how to use it.
> 

Done.

http://codereview.appspot.com/216067/diff/2001/2002#newcode64
Lib/pdb.py:64: if self.allow_kbdint:
On 2010/02/28 20:12:00, gregory.p.smith wrote:
> Initialize self.allow_kdbint in __init__ so that a SIGINT coming in before
> _cmdloop has run doesn't cause an AttributeError.

Done.

http://codereview.appspot.com/216067/diff/2001/2002#newcode215
Lib/pdb.py:215: # keyboard interrupts allow for an easy way to interrupt
On 2010/02/28 20:12:00, gregory.p.smith wrote:
> "to cancel the current command"

I changed the wording a bit, should be ok now.

http://codereview.appspot.com/216067/diff/2001/2002#newcode356
Lib/pdb.py:356: #it appears that that when pdb is reading input from a pipe
On 2010/02/28 20:12:00, gregory.p.smith wrote:
> Space after the # please.
> 
> Also, could you add a comment in here describing what the effect of this code
> is?
> 
> It looks like you catch KeyboardInterrupt here and remove the particular
> interrupted command from the list of commands to run at the current breakpoint
> but I may be misreading things as I haven't spent much time in pdb.py.

Done. I've also added a comment to explain what's going on.
Sign in to reply to this message.

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b