mirror of
https://github.com/python/cpython.git
synced 2025-08-03 16:39:00 +00:00
gh-118817: Fix asyncio REPL
on Windows (#118819)
This commit is contained in:
parent
35b5eaa176
commit
c3643a1214
2 changed files with 8 additions and 4 deletions
|
@ -108,7 +108,7 @@ if __name__ == '__main__':
|
|||
try:
|
||||
import readline # NoQA
|
||||
except ImportError:
|
||||
pass
|
||||
readline = None
|
||||
|
||||
interactive_hook = getattr(sys, "__interactivehook__", None)
|
||||
|
||||
|
@ -122,8 +122,9 @@ if __name__ == '__main__':
|
|||
except:
|
||||
pass
|
||||
else:
|
||||
completer = rlcompleter.Completer(console.locals)
|
||||
readline.set_completer(completer.complete)
|
||||
if readline is not None:
|
||||
completer = rlcompleter.Completer(console.locals)
|
||||
readline.set_completer(completer.complete)
|
||||
|
||||
repl_thread = REPLThread()
|
||||
repl_thread.daemon = True
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue