This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: improved readline usage in pdb
Type: Stage:
Components: Library (Lib) Versions: Python 2.3
process
Status: closed Resolution: out of date
Dependencies: Superseder:
Assigned To: Nosy List: mbrierst
Priority: normal Keywords: patch

Created on 2003-01-30 20:33 by mbrierst, last changed 2022-04-10 16:06 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
patchrlcomplete mbrierst, 2003-01-30 20:39
patchpdb mbrierst, 2003-01-30 20:39
Messages (1)
msg42602 - (view) Author: Michael Stone (mbrierst) Date: 2003-01-30 20:33
Adds tab-completion of locals and globals in the scope of the code being executed by pdb from the (Pdb) prompt.

patchrlcomplete:
* adds a local namespace to the arguments of Completer's constructor.  Necessary to evaluate local objects correctly when doing completion.  Defaults to None so backwards compatibility should be fine.
* No longer always loads the Completer on import.  Only loads it when a completer has not been assigned.  This is better if someone has previously loaded a completer they don't want changed.  Without this the pdb completer would have to save the old completer before importing the rlcompleter module to avoid the undesired side effect of pdb changing the completion function.
* removes words.append('__class__') as it should already be included.  I'm not sure if there's a good reason for this line.  It was originally written by Michael Hudson I believe, perhaps he knows if there is someplace this does something?  (this has nothing to do with the main work of this patch)
* allows __builtins__ to be completed like anything else.  Why not?  Sometimes I want to look at __builtins__.  Is there a reason not to allow it to be completed?  (again, nothing to do with the main patch)

patchpdb:
* complete method overrides Cmd's complete method.  Gives all completions from Cmd.complete followed by completions from rl_completer.

Let me know what you think of it (the idea and the implementation).  If you don't want my small irrelevant changes to rlcompleter, I can get rid of them.
History
Date User Action Args
2022-04-10 16:06:19adminsetgithub: 37871
2003-01-30 20:33:50mbrierstcreate