Patches item #1641544, was opened at 2007-01-22 06:52
Message generated for change (Comment added) made by rockyb
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=305470&aid=1641544&group_id=5470

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: Library (Lib)
Group: Python 2.6
Status: Open
Resolution: None
Priority: 5
Private: No
Submitted By: Stephen Emslie (stephenemslie)
Assigned to: Nobody/Anonymous (nobody)
Summary: rlcompleter tab completion in pdb

Initial Comment:
By default, Pdb and other instances of Cmd complete names for their commands. 
However in the context of pdb, I think it is more useful to complete 
identifiers and keywords in its current scope than to complete names of 
commands (most of which have single letter abbreviations). I believe this makes 
pdb a far more usable introspection tool.

I have discussed this proposal on the python-ideas list:
http://mail.python.org/pipermail/python-ideas/2007-January/000084.html

This patch implements the following:
  - creates an rlcompleter instance on Pdb if readline is available
  - adds a 'complete' method to the Pdb class. The only difference with 
rlcompleter's default behaviour is that is also updates rlcompleter's namespace 
to reflect the current local and global namespace, which is necessary because 
pdb changes scope as it steps through a program

This is a patch against python/Lib/pdb.py rev. 51745


----------------------------------------------------------------------

Comment By: Rocky Bernstein (rockyb)
Date: 2007-01-27 21:48

Message:
Logged In: YES 
user_id=158581
Originator: NO

I experimented with this a little in the pydb variant
(http://bashdb.sf.net/pydb). Some observations. First, one can include the
debugger commands into the namespace without too much trouble. See what's
checked into CVS for pydb; In particular look at the complete method of
pydbbdb. (Personally, I think adding debugger commands to the list of
completions is a little more honest.)

The second problem I have is that completion is not all that sensitive to
the preceding context.  If the line begins "step" or "1 + ", is it really
correct to list all valid symbols? 

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=305470&aid=1641544&group_id=5470
_______________________________________________
Patches mailing list
Patches@python.org
http://mail.python.org/mailman/listinfo/patches

Reply via email to