Skip to content

Commit 2c66f29

Browse files
committed
Import _pyrepl conditionally
1 parent 40d97c0 commit 2c66f29

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

‎python_files/pythonrc.py‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
def _initialize():
22
import re
33
import sys
4-
lazy import _pyrepl
54

65
if sys.platform != "win32":
76
import readline
87

98
# Override regex to support OSC codes
109
if sys.version_info.major >= 3 and sys.version_info.minor >= 3.13:
10+
import _pyrepl
1111
_pyrepl.utils.ANSI_ESCAPE_SEQUENCE = re.compile(
1212
r"\x1b(?:\[[ -@]*[A-~]|\][^\x1b\x07]*(?:\x07|\x1b\\))"
1313
)

0 commit comments

Comments
 (0)