mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
...
This commit is contained in:
parent
2880e83d1a
commit
dcf658b365
@ -112,6 +112,9 @@ def cli(port=4444):
|
|||||||
print('Connected to remote process', flush=True)
|
print('Connected to remote process', flush=True)
|
||||||
try:
|
try:
|
||||||
import readline
|
import readline
|
||||||
|
except ImportError:
|
||||||
|
pass
|
||||||
|
else:
|
||||||
histfile = os.path.join(cache_dir(), 'rpdb.history')
|
histfile = os.path.join(cache_dir(), 'rpdb.history')
|
||||||
try:
|
try:
|
||||||
readline.read_history_file(histfile)
|
readline.read_history_file(histfile)
|
||||||
@ -121,8 +124,7 @@ def cli(port=4444):
|
|||||||
p = pdb.Pdb()
|
p = pdb.Pdb()
|
||||||
readline.set_completer(p.complete)
|
readline.set_completer(p.complete)
|
||||||
readline.parse_and_bind("tab: complete")
|
readline.parse_and_bind("tab: complete")
|
||||||
except ImportError:
|
|
||||||
pass
|
|
||||||
sock.setblocking(True)
|
sock.setblocking(True)
|
||||||
with suppress(KeyboardInterrupt):
|
with suppress(KeyboardInterrupt):
|
||||||
end_of_input = PROMPT.encode('utf-8')
|
end_of_input = PROMPT.encode('utf-8')
|
||||||
|
Loading…
x
Reference in New Issue
Block a user