Syntax highlighting in PyREPL #131507
Copy link
Copy link
Closed
Labels
stdlibStandard Library Python modules in the Lib/ directoryStandard Library Python modules in the Lib/ directorytopic-replRelated to the interactive shellRelated to the interactive shelltype-featureA feature request or enhancementA feature request or enhancement
Description
We want PyREPL to syntax highlight Python code, like this:

Theming support is planned, but a separate concern. This issue is about enabling syntax to highlight correctly whenever color is used within the REPL anyway.
This is a feature for 3.14, with some test and code refactors that we will be bringing back to 3.13 for improved future maintenance.
Linked PRs
- gh-131507: Clean up tests and type checking for
_pyrepl#131509 - [3.13] gh-131507: Clean up tests and type checking for
_pyrepl(GH-131509) #131546 - gh-131507: Refactor screen and cursor position calculations #131547
- [3.13] gh-131507: Refactor screen and cursor position calculations (GH-131547) #131557
- gh-131507: Add support for syntax highlighting in PyREPL #131562
- gh-131507: Remove Misc/mypy symlinks from the repository #132270
- gh-131507: Add a way to recreate the
Misc/mypysymlinks if missing #132274 - [3.13] gh-131507: Add a way to recreate the
Misc/mypysymlinks if missing (GH-132274) #132293 - gh-131507: Add support for syntax highlighting in PyREPL #133247
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
stdlibStandard Library Python modules in the Lib/ directoryStandard Library Python modules in the Lib/ directorytopic-replRelated to the interactive shellRelated to the interactive shelltype-featureA feature request or enhancementA feature request or enhancement
Activity
pythongh-131507: Refactor screen and cursor position calculations
pythongh-131507: Refactor screen and cursor position calculations
pythongh-131507: Refactor screen and cursor position calculations
gh-131507: Clean up tests and type checking for `_pyrepl` (#131509)
[3.13] pythongh-131507: Clean up tests and type checking for `_pyrepl` (
pythongh-131507: Refactor screen and cursor position calculations
[3.13] gh-131507: Clean up tests and type checking for `_pyrepl` (GH-…
gh-131507: Refactor screen and cursor position calculations (GH-131547)
pythongh-131507: Refactor screen and cursor position calculations (py…
pythongh-131507: Add support for syntax highlighting in PyREPL
[3.13] gh-131507: Refactor screen and cursor position calculations (G…
gh-131507: Add a way to recreate the `Misc/mypy` symlinks if missing (#…
pythongh-131507: Add a way to recreate the `Misc/mypy` symlinks if mi…
[3.13] gh-131507: Add a way to recreate the `Misc/mypy` symlinks if m…
pythongh-131507: Add support for syntax highlighting in PyREPL
gh-131507: Add support for syntax highlighting in PyREPL (GH-133247)
StanFromIreland commentedon Jun 6, 2025
What do we think about adding color to
pydoc's repl interface? At a minimum that could be highlightingquit/helpetc. in their respective color...?pythongh-131507: Add support for syntax highlighting in PyREPL (pytho…