[3.13] gh-124096: Enable REPL virtual terminal support on Windows (GH-124119) by miss-islington · Pull Request #133457 · python/cpython · GitHub
Skip to content

[3.13] gh-124096: Enable REPL virtual terminal support on Windows (GH-124119) - #133457

Merged
ambv merged 2 commits into
python:3.13from
miss-islington:backport-a65366e-3.13
May 5, 2025
Merged

[3.13] gh-124096: Enable REPL virtual terminal support on Windows (GH-124119)#133457
ambv merged 2 commits into
python:3.13from
miss-islington:backport-a65366e-3.13

Conversation

@miss-islington

@miss-islington miss-islington commented May 5, 2025

Copy link
Copy Markdown
Contributor

To support virtual terminal mode in Windows PYREPL, we need a scanner
to read over the supported escaped VT sequences.

Windows REPL input was using virtual key mode, which does not support
terminal escape sequences. This patch calls SetConsoleMode properly
when initializing and send sequences to enable bracketed-paste modes
to support verbatim copy-and-paste.
(cherry picked from commit a65366e)

Co-authored-by: Y5 124019959+y5c4l3@users.noreply.github.com
Signed-off-by: y5c4l3 y5c4l3@proton.me
Co-authored-by: Petr Viktorin encukou@gmail.com
Co-authored-by: Pablo Galindo Salgado Pablogsal@gmail.com
Co-authored-by: Dustin L. Howett dustin@howett.net
Co-authored-by: wheeheee 104880306+wheeheee@users.noreply.github.com

…honGH-124119)

To support virtual terminal mode in Windows PYREPL, we need a scanner
to read over the supported escaped VT sequences.

Windows REPL input was using virtual key mode, which does not support
terminal escape sequences. This patch calls `SetConsoleMode` properly
when initializing and send sequences to enable bracketed-paste modes
to support verbatim copy-and-paste.
(cherry picked from commit a65366e)

Co-authored-by: Y5 <124019959+y5c4l3@users.noreply.github.com>
Signed-off-by: y5c4l3 <y5c4l3@proton.me>
Co-authored-by: Petr Viktorin <encukou@gmail.com>
Co-authored-by: Pablo Galindo Salgado <Pablogsal@gmail.com>
Co-authored-by: Dustin L. Howett <dustin@howett.net>
Co-authored-by: wheeheee <104880306+wheeheee@users.noreply.github.com>
@miss-islington
miss-islington requested a review from rhettinger as a code owner May 5, 2025 16:58
@python-cla-bot

python-cla-bot Bot commented May 5, 2025

Copy link
Copy Markdown

@ambv

ambv commented May 5, 2025

Copy link
Copy Markdown
Contributor

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

topic-repl Related to the interactive shell

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants