Skip to content

Commit d82d03e

Browse files
Explicitly import rlcompleter as it may not be visible when imported in .pdbrc.
The issue was observed on Python 2.7.13.
1 parent 3855ec8 commit d82d03e

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

recipes/Python/498182_sane_tab_completion_in_pdb/recipe-498182.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ def complete(self, text, state):
2222
"""
2323
# keep a completer class, and make sure that it uses the current local scope
2424
if not hasattr(self, 'completer'):
25+
import rlcompleter
2526
self.completer = rlcompleter.Completer(self.curframe.f_locals)
2627
else:
2728
self.completer.namespace = self.curframe.f_locals

0 commit comments

Comments
 (0)