ptpython
Python REPL build on top of prompt_toolkit
Decision gist · record as of 2026-08-14
Yes. ptpython is a mature, well-maintained tool with low install friction and no known vulnerabilities. The aging maintenance status (267 days since last release) is not alarming given the active repository and stable feature set. Install it if you spend significant time in the Python REPL and want syntax highlighting, autocompletion, and better editing—it's a straightforward quality-of-life upgrade.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- Requires Python 3.8 or later; config file support only works when invoking ptpython directly, not when embedded.
- Low install friction with a pure Python wheel.
- Maintenance is aging—the last release was 267 days ago—but the repository remains active with recent commits and a solid user base of 5446 stars.
License · maintenance · safety
permissive license (permissive) — Licensed under BSD (permissive), so you can use and modify ptpython freely in both open-source and commercial projects without significant legal constraints.
last release 2025-11-20 (267 days) · last repo commit 2025-11-21 · 5,446 stars
0 known vulnerabilities (OSV.dev, 2026-08-14) · 1,768,201 downloads/mo, #3,575 on PyPI
Alternatives
Verify before relying
pip install ptpython
ptpython
# Or embed in your application:
from ptpython.repl import embed
embed(globals(), locals())- Whether the aging maintenance status affects stability or feature development going forward
- Performance characteristics when handling very large histories or complex autocompletion scenarios
What it is and what it does
ptpython is a drop-in replacement for the standard Python REPL that adds modern terminal features: syntax highlighting via pygments, multiline editing with proper indentation handling, intelligent autocompletion through jedi, and support for both Vi and Emacs key bindings. It runs on Linux, BSD, macOS, and Windows, and can be invoked as a standalone command or embedded directly into Python applications.
The package depends on prompt_toolkit for terminal UI, pygments for syntax coloring, jedi for code completion, and appdirs for platform-aware configuration file discovery. It supports asyncio event loops for top-level await, custom color schemes, mouse input, and bracketed paste mode. You can customize behavior through a config.py file or command-line flags, and it integrates with IPython (via ptipython) and Django's shell_plus command.
Use it for
- Replace your default Python REPL with a more productive interactive shell for daily development and exploration.
- Embed ptpython in a Python application to provide users with an advanced debugging or inspection interface.
- Use ptipython to get IPython's magic functions and shell integration alongside ptpython's UI enhancements.
- Configure Vi or Emacs key bindings to match your editor workflow in the interactive shell.
- Debug asyncio code interactively with top-level await support via the --asyncio flag.
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
Yes.
ptpython is a mature, well-maintained tool with low install friction and no known vulnerabilities. The aging maintenance status (267 days since last release) is not alarming given the active repository and stable feature set. Install it if you spend significant time in the Python REPL and want syntax highlighting, autocompletion, and better editing—it's a straightforward quality-of-life upgrade.
Install
ptpython on PyPI
Before you install
Low install friction with a pure Python wheel. Maintenance is aging—the last release was 267 days ago—but the repository remains active with recent commits and a solid user base of 5446 stars.
Requires Python 3.8 or later; config file support only works when invoking ptpython directly, not when embedded.
License in practice
Licensed under BSD (permissive), so you can use and modify ptpython freely in both open-source and commercial projects without significant legal constraints.
Quickstart
pip install ptpython
ptpython
# Or embed in your application:
from ptpython.repl import embed
embed(globals(), locals())
Verify before relying
- Whether the aging maintenance status affects stability or feature development going forward
- Performance characteristics when handling very large histories or complex autocompletion scenarios
Package facts
| License | permissive license permissive |
| Python support | Supports the current Python release >=3.8 |
| Install friction | Low. Pure-Python wheel |
| Runtime dependencies | 4 packagesappdirsjediprompt_toolkitpygments |
| Maintenance | Aging 267 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 1,768,201 / month, #3,575 on PyPI 30-day window, as of 2026-08-14 |
| Known vulnerabilities | None known OSV.dev, checked 2026-08-14 |
| Classifiers | License :: OSI Approved :: BSD LicenseProgramming Language :: PythonProgramming Language :: Python :: 3Programming Language :: Python :: 3 :: OnlyProgramming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.8Programming Language :: Python :: 3.9 |
Evidence: ptpython-3.0.32-py3-none-any.whl
Tags
Let your AI agent find packages like this
Example. Real query, live index.
You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.
wish › “python repl replacement”
- ptpythonptpython is an advanced interactive Python shell that replaces the…
- bpythonbpython is an enhanced Python interactive interpreter that replaces…
- gnureadlineProvides GNU Readline library support for Python interactive shells…
Give your agent the search over MCP, or paste the wish link into any chat.
More Terminals packages
Wraps any iterable to display a real-time progress bar in the terminal or Jupyter notebook, showing iteration count, elapsed time, and estimated time remaining.
Rich renders styled text, tables, progress bars, syntax highlighting, markdown, and tracebacks to the terminal with minimal code.
Colorama makes ANSI escape sequences for colored terminal text work on Windows by intercepting and converting them to win32 API calls, while passing through unchanged on other platforms.
Install it if you need colored terminal output to work on Windows or want to use ANSI-based libraries portably; skip it only if you target non-Windows platforms…
Measures the displayed width of Unicode strings in terminals, accounting for wide characters, combining marks, and terminal escape sequences that standard Python string functions mishandle.
Install it if your application formats text for terminals and handles non-ASCII characters.
Run a subprocess in a pseudo terminal (pty) and interact with its input and output, enabling automation of interactive programs that require terminal features like password prompts or curses-style interfaces.
However, note that it is aging (last release 2020-12-28) and not actively maintained; it works well for its narrow, well-defined purpose but won't receive updates for…
Pexpect spawns and controls interactive console applications by sending input and matching output patterns, automating tasks that would otherwise require manual interaction.
See also bpython · prompt_toolkit · pyvim · click-repl · ipython · ipython-pygments-lexers · flask-shell-ipython · find-libpython · libtmux · cheap-repr