Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork33.7k
gh-112510: Addreadline.backend for the backend readline uses#112511
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Changes fromall commits
a912085bc70220f707ddb95d0e574e595f83f78b4f8cc11aeFile filter
Filter by extension
Conversations
Uh oh!
There was an error while loading.Please reload this page.
Jump to
Uh oh!
There was an error while loading.Please reload this page.
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -27,23 +27,28 @@ Readline library in general. | ||
| .. note:: | ||
| The underlying Readline library API may be implemented by | ||
| the ``editline`` (``libedit``) library instead of GNU readline. | ||
| On macOS the :mod:`readline` module detects which library is being used | ||
| at run time. | ||
| The configuration file for ``editline`` is different from that | ||
| of GNU readline. If you programmatically load configuration strings | ||
| you can use :data:`backend` to determine which library is being used. | ||
| If you use``editline``/``libedit`` readline emulation on macOS, the | ||
| initialization file located in your home directory is named | ||
| ``.editrc``. For example, the following content in ``~/.editrc`` will | ||
| turn ON *vi* keybindings and TAB completion:: | ||
| python:bind -v | ||
| python:bind ^I rl_complete | ||
| .. data:: backend | ||
encukou marked this conversation as resolved. Show resolvedHide resolvedUh oh!There was an error while loading.Please reload this page. | ||
| The name of the underlying Readline library being used, either | ||
| ``"readline"`` or ``"editline"``. | ||
encukou marked this conversation as resolved. Show resolvedHide resolvedUh oh!There was an error while loading.Please reload this page. | ||
| .. versionadded:: 3.13 | ||
| Init file | ||
| --------- | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -3293,7 +3293,7 @@ def setUpClass(): | ||
| # Ensure that the readline module is loaded | ||
| # If this fails, the test is skipped because SkipTest will be raised | ||
| readline = import_module('readline') | ||
| if readline.backend == "editline": | ||
Member There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others.Learn more. For just internal usage, why not just use readline._backend? | ||
| raise unittest.SkipTest("libedit readline is not supported for pdb") | ||
| def test_basic_completion(self): | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| Add :data:`readline.backend` for the backend readline uses (``editline`` or ``readline``) |