bpython: a curses REPL for quick Python experiments
bpython - A fancy curses interface to the Python interactive interpreter
At a glance
- What is it?
- bpython adds syntax highlighting, inline autocompletion and a parameter list to the standard Python interpreter without becoming an IDE. It suits short interactive sessions, and it is the wrong tool for notebook-style work.
- Who is it for?
- bpython fits engineers who spend their day in a terminal and want completion, highlighting and a parameter list without leaving the shell, and who value the rewind and module-reload keys when poking at unfamiliar code. It is a poor fit if you need persistent notebooks, remote kernel execution or rich output rendering, because the project explicitly does not aim to be a complete IDE.
- Can I use it commercially?
- Check first. The repository uses a licence we do not classify automatically, so read its LICENSE file before any commercial use.
- Is it still maintained?
- Yes. The repository last received commits 3 days ago.
- What is it written in?
- Mainly Python, according to GitHub's language statistics.
Answers come from the project's GitHub data, last synced on November 24, 2026, and from our analysis. They are not legal advice.
Star history
- bpython/bpython2,775 ★ · -1
| Repository | 2026-10-04 | 2026-11-24 |
|---|---|---|
| bpython/bpython | 2.8k | 2.8k |
-1 Stars in the last 51 days, measured from the daily GitHub snapshot. Compare with other projects
Editorial analysis
What bpython replaces, and for whom
The target user is someone who already lives in a terminal. The README describes bpython as a lightweight interpreter that adds features common to IDEs: syntax highlighting, expected parameter list, auto-indentation and autocompletion. It is positioned as a replacement for the vanilla Python interpreter on occasions like testing out a solution to someone's problem on IRC, or quickly testing a method without creating a temporary file.
The scope statement matters more than the feature list. The README says bpython does not aim to be a complete IDE and that the focus is on implementing a few ideas in a practical, useful, and lightweight manner. That is a real boundary. If your work needs a debugger with a variable inspector, a plot pane, or a persistent document you can re-run cell by cell, bpython is not trying to be that, and the repository layout reflects it: the top level holds bpython/, bpdb/, doc/, data/ and theme/, not a plugin ecosystem.
There is also a second entry point in the tree. The README mentions bpython-urwid, which requires urwid as an additional package. So the project ships more than one front end over the same interpreter core, and the curses interface described in the README is the default one.
How the curses front end is put together
The dependency list in requirements.txt is the clearest description of the mechanism. Pygments does the lexing, and the README states that in-line syntax highlighting uses Pygments for lexing the code as you type. curtsies >= 0.4.0 is the terminal layer that draws the screen; cwcwidth handles character widths, which is what keeps the layout correct when the buffer contains wide characters. greenlet is present, which is consistent with a design where the input loop and the evaluation of a line are separate execution contexts. pyxdg locates the config directory, and requests is what the pastebin feature uses to upload the screen contents.
The optional dependencies map onto optional features. jedi is listed for experimental multiline completion, watchdog for monitoring imported modules for changes, and pyperclip for copying to the clipboard. Sphinx is optional and only needed for the documentation, and babel is optional and only needed for internationalization. That split is worth reading before you file a bug: if multiline completion does not work, the README points at jedi, not at the core interpreter.
The parameter list has a defined fallback order. The README states that the inspect module, which works with any Python function, is tried first, and then pydoc if that fails. That ordering explains why the parameter hint sometimes appears for functions with no usable signature metadata: pydoc is doing the work.
Installing bpython and running a first session
The README gives pip as the primary route. The command installs the package and its required dependencies from requirements.txt, including curtsies, Pygments and greenlet. After it finishes, the bpython executable should be on your PATH.
$ pip install bpythonStart it by typing bpython in your terminal. The README says you exit with the exit() command or by pressing control-D, exactly as with regular interactive Python. A first useful check is to type a function call and watch the expected parameter list appear as you open the parenthesis.
$ bpythonConfiguration lives in a single file. The README says to save it as ~/.config/bpython/config, which it also describes as $XDG_CONFIG_HOME/bpython/config, and that you can point at another path on the command line. The available options are listed in the sample-config file rather than in the README itself.
$ bpython --config /path/to/bpython/configIf you would rather not use pip, the README documents OS package managers as well: apt install bpython on Ubuntu and Debian (or apt-get install bpython on older versions), pacman -S bpython on Arch Linux, dnf install bpython on Fedora, guix install bpython on GNU Guix, and sudo port install py-bpython through MacPorts on macOS. The README notes that macOS does not include a package manager by default, so the MacPorts route assumes you installed one.
Rewind, module reload and the editor handoff
Three features in the README are more than decoration, and each has a sharp edge.
Rewind is the one to understand before you rely on it. The README is candid that the name is not great: it says the feature is not called Undo because that would be misleading, but that Rewind is probably as bad. The mechanism is that the code entered is kept in memory, and when rewind is called the last line is popped and the entire session is re-evaluated. Control-R triggers it. Re-evaluating the whole session is a different guarantee from undoing one statement. Any side effect from earlier lines runs again, so rewind is safe for pure exploration and risky for anything that writes a file, opens a socket or mutates external state.
Module reload is the same idea applied to imports. F6 clears sys.modules and reruns your session, which the README frames as a way to test changes to code in a module you are working on. It is a fast loop for editing a library and checking the result without restarting the interpreter. It is not a hot-reload system for running services, and it will not help with state that lives outside the module namespace.
The editor handoff is the third. F7 opens the current session in a text editor, and if modifications are made, the session is rerun with those changes. That is a genuinely different interaction model from line-by-line entry: you edit the history as a document and the interpreter replays it. F8 uploads the screen contents to pastebin and returns a URL, which is the requests dependency in action. If you work somewhere that blocks outbound uploads, that key is the one to avoid.
Where bpython is the wrong choice
The README's own framing rules out a whole class of use. It says bpython does not aim to be a complete IDE. If you need a notebook format with stored outputs, a variable explorer, inline charts, or a kernel you can attach to a remote machine, none of that is in the feature list, and the dependency set does not suggest it is coming. Reach for a notebook environment instead.
The rewind semantics are a second limit. Re-evaluating the entire session after popping a line means the feature is only as safe as your history. Long sessions with expensive imports pay that cost on every rewind, and sessions with side effects can produce results that are hard to reason about. The README describes the mechanism plainly; it does not claim the feature is safe for arbitrary code.
Terminal compatibility is a third. The interface is curses-based and draws with curtsies, and cwcwidth exists to handle character widths correctly. That is a sign the rendering path is sensitive to the terminal it runs in. If your environment is a constrained serial console, a CI log, or a Windows shell without a suitable curses build, the experience is not the one the README's screenshots show. The README links to a Curses reference page for Windows binaries, which tells you curses is not simply present there.
Finally, several features are opt-in through optional packages. Multiline completion is described as experimental and depends on jedi. Module change monitoring depends on watchdog. Clipboard copy depends on pyperclip. A plain pip install bpython installs the required dependencies, not necessarily these, so a missing feature may be a missing optional package rather than a bug.
bpython vs ipython vs ptpython
The comparison people actually search for is against IPython and ptpython, and the difference is architectural rather than cosmetic.
IPython is a larger system. It provides a kernel protocol that front ends such as notebooks and remote consoles connect to, which is why it can drive a browser-based interface and a terminal one from the same execution model. bpython has no kernel in its dependency list; the README describes a curses interface to the interactive interpreter, with Pygments for lexing and curtsies for drawing. If you need to attach a front end over a network, or to keep a document of executed cells, the IPython model is the one built for it. If you want a terminal session that starts instantly and behaves like the built-in interpreter with better input handling, bpython is the smaller thing.
ptpython is the closer comparison, because it is also a terminal REPL with completion and highlighting rather than a kernel. The distinguishing details in this repository are the session-level operations: rewind via control-R, which re-evaluates the whole session, and the F6 reload that clears sys.modules. Those are opinionated choices about how to iterate on a piece of code, and they are the part of bpython that a plain completion-and-highlighting REPL does not necessarily offer. The README's parameter list fallback, inspect first and then pydoc, is another concrete behaviour to compare against whatever the alternative does when a signature is unavailable.
None of these three is strictly better. The question is whether you want a kernel, a terminal REPL, or a terminal REPL with session replay, and the README answers that for bpython: a lightweight tool that does a few things well.
Maintenance, licensing and upgrade cost
The repository is not archived, and the last push was on 2026-09-02. Releases are infrequent and unevenly spaced: 0.24 in August 2023, 0.25 in January 2025, and 0.26 in October 2025. For a tool you install once and run locally, that cadence is workable, but it means you should not expect rapid fixes for terminal rendering quirks. Budget for pinning a version in your environment rather than tracking the default branch.
Upgrade cost is mostly dependency cost. requirements.txt pins curtsies at >= 0.4.0 and setuptools at >= 62.4.0, and pyproject.toml declares setuptools >= 62.4.0 as the build requirement. The build also probes for babel and for Sphinx 1.5 or newer at setup time, and skips the translation and documentation steps when they are absent. That means a source install succeeds without them, but building translations or docs requires installing those extras first.
On licensing, the repository metadata reports NOASSERTION, which means the automated classifier could not map the LICENSE file to a standard identifier. The LICENSE file is at the top level of the repository, and its actual text is what governs your use. Read it directly rather than relying on the metadata field, and if you redistribute bpython inside a product, have someone who can interpret the terms confirm what obligations apply. That is a reading task, not a legal conclusion this article can supply.
Editorial conclusion
bpython fits engineers who spend their day in a terminal and want completion, highlighting and a parameter list without leaving the shell, and who value the rewind and module-reload keys when poking at unfamiliar code. It is a poor fit if you need persistent notebooks, remote kernel execution or rich output rendering, because the project explicitly does not aim to be a complete IDE. Before adopting it, verify that your Python version satisfies the curtsies >= 0.4.0 requirement in requirements.txt, check the LICENSE file in the repository root for the terms that apply to your distribution, and confirm that the optional jedi and watchdog packages you want are available in your environment, since multiline completion and module monitoring depend on them.
Frequently asked questions
What is bpython?
bpython is a curses interface to the Python interactive interpreter. The README describes it as a lightweight interpreter that adds syntax highlighting, an expected parameter list, auto-indentation and autocompletion, and states that it does not aim to be a complete IDE.
How do I install bpython?
The README gives pip install bpython as the primary route, and also documents OS package managers including apt install bpython on Ubuntu and Debian, pacman -S bpython on Arch Linux, dnf install bpython on Fedora, guix install bpython on GNU Guix, and sudo port install py-bpython via MacPorts on macOS.
What is the difference between bpython and ptpython?
Both are terminal REPLs with completion and highlighting, and the README does not compare them directly. What the bpython README does document is session-level behaviour of its own: control-R rewind pops the last line and re-evaluates the entire session, and F6 clears sys.modules and reruns the session to test module changes.
How does bpython compare with IPython?
The README does not discuss IPython, so the comparison has to be made from what each project is. bpython is documented as a curses interface to the interactive interpreter, with no kernel in its dependency list; IPython's kernel model is what allows notebook and remote front ends, which is outside the scope bpython describes for itself.
Official sources
Add this badge to your README
If you maintain this project, the badge below links readers to this analysis and shows its maintenance status from the daily GitHub snapshot. Paste the markdown into your README; add ?metric=license or ?metric=stars to the image URL for a different field.
[](https://hysenlabs.com/projects/bpython-bpython)Star history chart for your README
[](https://hysenlabs.com/projects/bpython-bpython)Was this useful?