--- id: ptpython version: "3.0.32" license: unclear license_treatment: permissive maintenance: aging --- # ptpython — Python REPL build on top of prompt_toolkit License: permissive · Maintenance: aging · Downloads: 1.8M/mo ## 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 above — verify before relying. ptpython is an advanced interactive Python shell that replaces the standard REPL with syntax highlighting, multiline editing, autocompletion, and configurable key bindings. 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 pip install ptpython uv add ptpython poetry add ptpython ## Installing ptpython 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. 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()) Requires Python 3.8 or later; config file support only works when invoking ptpython directly, not when embedded. 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: not declared (permissive) - Python support: supports_current - Install friction: low - Maintenance: aging - Downloads: 1.8M/month (top 5,000 on PyPI) - Known vulnerabilities: none known ## Tags python repl replacement, interactive python shell, syntax highlighting repl, python autocompletion, advanced python prompt, multiline python editor, vi emacs key bindings, repl, interactive-shell, developer-tools [View on SkillFed](https://skillfed.io/packages/ptpython) · [View on PyPI](https://pypi.org/project/ptpython/)