gh-111201: Support pyrepl on Windows (#119559)

Co-authored-by: Anthony Shaw <anthony.p.shaw@gmail.com>
Co-authored-by: Łukasz Langa <lukasz@langa.pl>
This commit is contained in:
Dino Viehland 2024-05-31 00:49:03 -07:00 committed by GitHub
parent 13a5fdc72f
commit 0d07182821
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
15 changed files with 1020 additions and 49 deletions

View file

@ -34,8 +34,12 @@ import ast
from types import ModuleType
from .readline import _get_reader, multiline_input
from .unix_console import _error
_error: tuple[type[Exception], ...] | type[Exception]
try:
from .unix_console import _error
except ModuleNotFoundError:
from .windows_console import _error
def check() -> str:
"""Returns the error message if there is a problem initializing the state."""