| 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 |
|
| 22 |
|
| 23 |
|
| 24 |
|
| 25 |
_READLINE_VERSION = 0x0504 |
| 26 |
_READLINE_RUNTIME_VERSION = 0x0504 |
| 27 |
_READLINE_LIBRARY_VERSION = "pyrepl" |