gnureadline
The standard Python readline extension statically linked against the GNU readline library.
What it is and what it does
gnureadline bundles the GNU Readline library and compiles it statically into a Python extension module, providing proper readline support on systems like macOS that ship with libedit instead. It solves the problem that libedit, while mostly compatible, is not fully equivalent to GNU Readline, leading to subtle differences in command-line editing behavior and history handling.
The package offers two main use patterns: direct import override (try gnureadline first, fall back to readline) for scripts that need explicit readline control, and a site-customization hook via the override_readline script to fix tab completion in the interactive Python shell itself. It has no runtime dependencies and is available as pre-built wheels for Python 3.10–3.13 on macOS and Linux.
Use it for:
- Fix tab completion in the interactive Python shell on macOS when the default readline is actually libedit.
- Override readline in scripts to ensure GNU Readline behavior across platforms without conditional imports.
- Maintain consistent command history and editing experience in Python REPL across macOS and Linux systems.
- Enable proper readline functionality in virtualenvs or python-build-standalone distributions where libedit is the default.
- Restore readline behavior on Python 3.13+ if the new interactive interpreter's reimplementation causes unexpected differences.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Provides GNU Readline library support for Python interactive shells and scripts on platforms that ship with libedit instead, enabling proper command-line editing and history.
Yes, but with conditions. Install if you are on macOS or a POSIX system where Python's readline is actually libedit and you need GNU Readline's full feature set. The GPLv3 copyleft license is a blocker for proprietary software. Medium install friction (compiled wheels) is acceptable for most developers. No known vulnerabilities. Maintenance is aging but stable; the package does one thing well and rarely needs updates.
Install
gnureadline on PyPI
pip
pip install gnureadlineuv
uv add gnureadlinepoetry
poetry add gnureadlineInstalling gnureadline
Before you install
Medium install friction due to compiled wheels for specific Python versions and architectures (cp310–cp313, x86_64 and aarch64). Last release 220 days ago; repository active and maintained but aging status suggests infrequent updates.
License in practice
GPL-3.0-or-later copyleft license means any code linking this package must comply with GPLv3 terms. Acceptable for open-source projects and internal use, but problematic for proprietary software distribution.
Quickstart
pip install gnureadline
# In your script or shell startup:
try:
import gnureadline as readline
except ImportError:
import readline
# Or fix the interactive shell:
python -m override_readline
Requires pre-built wheel for your Python version (3.10–3.13) and architecture (x86_64 or aarch64); no source distribution available for other versions.
Verify before relying
- Whether the package works correctly with Python 3.14 and 3.15 on all listed platforms despite classifier support claims.
- Compatibility with the new Python 3.13 interactive interpreter and whether PYTHON_BASIC_REPL=1 workaround is reliable.
Package facts
| License | GPL-3.0-or-later (copyleft) |
| Python support | not specified |
| Install friction | medium — platform-specific wheel |
| Runtime dependencies | none |
| Maintenance | aging — 220 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 362,372/month — #7,233 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: gnureadline-8.3.3-cp310-cp310-macosx_10_9_x86_64.whl; gnureadline-8.3.3-cp310-cp310-macosx_11_0_arm64.whl; gnureadline-8.3.3-cp310-cp310-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl; gnureadline-8.3.3-cp310-cp310-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl; gnureadline-8.3.3-cp311-cp311-macosx_10_9_x86_64.whl; gnureadline-8.3.3-cp311-cp311-macosx_11_0_arm64.whl; gnureadline-8.3.3-cp311-cp311-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl; gnureadline-8.3.3-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl; gnureadline-8.3.3-cp312-cp312-macosx_10_13_x86_64.whl; gnureadline-8.3.3-cp312-cp312-macosx_11_0_arm64.whl; gnureadline-8.3.3-cp312-cp312-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl; gnureadline-8.3.3-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl; gnureadline-8.3.3-cp313-cp313-macosx_10_13_x86_64.whl; gnureadline-8.3.3-cp313-cp313-macosx_11_0_arm64.whl; gnureadline-8.3.3-cp313-cp313-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl; gnureadline-8.3.3-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl; gnureadline-8.3.3-cp313-cp313t-macosx_10_13_x86_64.whl; gnureadline-8.3.3-cp313-cp313t-macosx_11_0_arm64.whl; gnureadline-8.3.3-cp313-cp313t-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl; gnureadline-8.3.3-cp313-cp313t-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl
Tags
More Python Modules packages
Converts domain names between Unicode and…
permissive · top 100 on PyPI
setuptoolsSetuptools is a Python build backend and…
permissive · top 100 on PyPI
PyYAMLPyYAML parses and emits YAML 1.1 data format,…
permissive · top 100 on PyPI
pydanticPydantic validates Python data structures…
permissive · top 100 on PyPI
annotated-typesProvides reusable metadata objects for use with…
permissive · top 100 on PyPI
typing-inspectionProvides runtime tools to inspect and…
permissive · top 100 on PyPI
readlineProvides GNU readline library support for…
copyleft · top 15,000 on PyPI
pyreadline3Provides GNU readline-like keyboard input…
permissive · top 5,000 on PyPI
tabcompleterAdds Tab-key autocompletion and command…
permissive · top 5,000 on PyPI
pyreadlineProvides GNU readline-like line editing and…
permissive · top 15,000 on PyPI
pyreplpyrepl is a pure-Python readline-like library…
permissive · top 5,000 on PyPI
fancycompleterAdds colorful TAB completion to the Python…
permissive · top 5,000 on PyPI
prompt_toolkitprompt_toolkit is a Python library for building…
permissive · top 1,000 on PyPI
ptpythonptpython is an advanced interactive Python…
permissive · top 5,000 on PyPI
urwid-readlineAdds readline-style keyboard shortcuts to urwid…
permissive · top 15,000 on PyPI
ipythonIPython is an enhanced interactive Python shell…
permissive · top 1,000 on PyPI