bpython is a lightweight Python interpreter UI with syntax highlighting, autocomplete, parameter hints, and session rewind for interactive experimentation.
Overview
bpython replaces the standard terminal Python REPL with a curses-based interface that adds IDE-like conveniences while staying small. It highlights syntax as you type using Pygments, offers readline-style autocomplete with live suggestions, and shows expected parameter lists for function calls via inspect and pydoc.
A rewind feature drops the last entered line and re-evaluates the session, which helps when exploring APIs interactively. You can open the current line or full session in an external editor, send buffer contents to a pastebin, save to a file, or reload imported modules to pick up local code changes during development.
The project targets Linux, BSD, macOS, and Windows, with packages available through pip and several distribution package managers. It deliberately does not aim to be a full IDE; it focuses on a handful of practical enhancements for quick tests, IRC troubleshooting, and ad hoc scripting.
An alternate urwid-based frontend exists with its own dependency set for users who prefer that toolkit.
Key features
- In-line syntax highlighting
- Autocomplete with suggestions
- Function parameter hints
- Session rewind and re-evaluation
- External editor integration
- Pastebin and file export
- Module reload for local changes
- Python 3 interactive support
Use cases
- Quick Python API experiments
- Interactive debugging on IRC
- REPL work without temp files
- Teaching and live code exploration