This commit is contained in:
Kovid Goyal 2021-02-09 23:49:03 +05:30
parent 2880e83d1a
commit dcf658b365
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C

View File

@ -112,6 +112,9 @@ def cli(port=4444):
print('Connected to remote process', flush=True)
try:
import readline
except ImportError:
pass
else:
histfile = os.path.join(cache_dir(), 'rpdb.history')
try:
readline.read_history_file(histfile)
@ -121,8 +124,7 @@ def cli(port=4444):
p = pdb.Pdb()
readline.set_completer(p.complete)
readline.parse_and_bind("tab: complete")
except ImportError:
pass
sock.setblocking(True)
with suppress(KeyboardInterrupt):
end_of_input = PROMPT.encode('utf-8')