bpython
bpython is a lightweight, enhanced interactive Python REPL that provides in-line auto-completion, syntax highlighting, and other productivity features.
Installation and Setup
Install from PyPI:
Verify the installation:
Shell
$ bpython --version
Key Features
- In-line auto-completion with call signatures and docstrings shown as you type.
- Syntax highlighting and smart indentation inside a terminal UI.
- Rewind capability to undo the last executed code block during a session.
- Session export and paste helpers to write out or share the current buffer.
- Configurable colors, key bindings, and behavior through a simple config file.
Usage
Start an enhanced interactive session:
Shell
$ bpython
Run a script inside the enhanced shell:
Shell
$ bpython script.py
Save or share the session content using the built-in write or paste commands, then exit with Ctrl+D when done.