Debian Codegraph @

lib_pypy/readline.py

raw symbols SCIP
1 """readline - Importing this module enables command line editing using
2 the pyrepl library. The API is a subset of the GNU readline library.
3 It also contains extensions for multiline input.
4
5 Note that some of the functions present in the CPython module 'readline'
6 are only stubs at the moment.
7 """
8
9 try:
10 from pyrepl.readline import *
11 except ImportError:
12 import sys
13 if sys.platform == 'win32':
14 raise ModuleNotFoundError("the 'readline' module is not available on Windows"
15 " (on either PyPy or CPython)", name="readline")
16 raise
17 else:
18 from pyrepl.readline import _setup
19 _setup()
20
21 # PyPy uses a pure Python readline implementation (pyrepl) rather than
22 # linking against the GNU readline C library. These version attributes
23 # are set to a value below 0x0600 to reflect that parse_and_bind() is a
24 # stub and features gated on GNU readline >= 6.0 are not available.
25 _READLINE_VERSION = 0x0504
26 _READLINE_RUNTIME_VERSION = 0x0504
27 _READLINE_LIBRARY_VERSION = "pyrepl"