A library for building flexible command line interfaces
Project Links
Meta
Author: Michael Hudson-Doyle
Maintainer: bretello
Requires Python: >=3.8
Classifiers
Development Status
- 4 - Beta
Environment
- Console
License
- OSI Approved :: BSD License
Programming Language
- Python :: 3.8
- Python :: 3.9
- Python :: 3.10
- Python :: 3.11
- Python :: 3.12
Intended Audience
- Developers
Operating System
- POSIX
- Microsoft :: Windows
Topic
- Utilities
pyrepl
This is pyrepl, a readline-a-like in pure Python.
It requires python 3.8 (or newer) and features:
- sane multi-line editing
- history, with incremental search
- completion, including displaying of available options
- a fairly large subset of the readline emacs-mode keybindings (adding more is mostly just a matter of typing)
- a liberal, Python-style, license
- a new python top-level
- no global variables, so you can run two or more independent readers without having their histories interfering.
- no hogging of control -- it should be easy to integrate pyrepl into YOUR application's event loop.
- generally speaking, a much more interactive experience than readline (it's a bit like a cross between readline and emacs's mini-buffer)
There are probably still a few little bugs & misfeatures, but I like it, and use it as my python top-level most of the time.
To get a feel for it, just execute:
python pyrepl/pythoni.py
(One point that may confuse: because the arrow keys are used to move up and down in the command currently being edited, you need to use ^P and ^N to move through the history)
Installation
If you like what you see, you can install it with the familiar
$ pip install pyrepl
which will also install pythoni script.
Changelog
See CHANGELOG
0.11.4
Jul 17, 2025
0.11.3.post1
Apr 13, 2025
0.11.3
Apr 13, 2025
0.9.0
Apr 16, 2019
0.8.4
May 17, 2012
0.8.2
Nov 23, 2010