skillfed

gnureadline

The standard Python readline extension statically linked against the GNU readline library.

gnureadline v8.3.3 362.4K downloads/30d#7,233 on PyPI85
Copyleft license GPL-3.0-or-later AGING released

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 gnureadline

uv

uv add gnureadline

poetry

poetry add gnureadline

Installing 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

Development Status :: 5 - Production/StableEnvironment :: ConsoleIntended Audience :: DevelopersIntended Audience :: End Users/DesktopOperating System :: MacOS :: MacOS XOperating System :: POSIXProgramming Language :: CProgramming Language :: Python :: 2Programming Language :: Python :: 3Topic :: Software Development :: Libraries :: Python Modules

Tags

gnu readline pythonreadline tab completionpython shell editinglibedit replacementcommand line historyinteractive python repl
readlineshell-replmacos-compat

More Python Modules packages