-
-
Notifications
You must be signed in to change notification settings - Fork 31.8k
gh-111201: Support pyrepl on Windows #119559
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
70 commits
Select commit
Hold shift + click to select a range
1061d22
Windows repl support
DinoV fa0f538
Arrow key support
DinoV 6f35100
Make backspace clear char
DinoV 7772787
Fix missing newline after input
DinoV aced5ae
Make insert work
DinoV fa3815f
Fix delete in middle
DinoV b30b105
Fix crash on invalid command key
DinoV df262c4
More fixes
DinoV 6e57316
Colorize
DinoV 18ecc2e
Use constants
DinoV 60525eb
Use UnicodeChar
DinoV af79a17
Simplify
DinoV 5f99256
Fix scrolling on input which is longer than screen/scrollback
DinoV bdff535
fix pager typo and refactor some unused branches (#41)
tonybaloney 88d64f5
Implement screen clear for Windows (#42)
tonybaloney 8a74306
Fix word wrap not being enabled in Windows Terminal
DinoV 38e9c58
Fix culmitive errors in wrapping as lines proceed
DinoV 9cddace
Fix issues with inputs longer than a single line
DinoV fc4efee
Resize WIP
DinoV 564e6e1
set compat based on Windows build version
tonybaloney 3ae4316
use escape sequence for clearing screen and setting cursor position
tonybaloney 5bb02a2
Remove unused imports
tonybaloney 500761e
Windows repl support
DinoV 98f16b9
Arrow key support
DinoV 911a76a
Make backspace clear char
DinoV 77f1c42
Fix missing newline after input
DinoV 243817d
Make insert work
DinoV 25f51b4
Fix delete in middle
DinoV 5242239
Fix crash on invalid command key
DinoV febe424
More fixes
DinoV 756ac47
Colorize
DinoV 50fd4c9
Use constants
DinoV ff46d66
Use UnicodeChar
DinoV fbb9f84
Simplify
DinoV 683f5f6
Fix scrolling on input which is longer than screen/scrollback
DinoV 2c524b8
fix pager typo and refactor some unused branches (#41)
tonybaloney 44ce57b
Implement screen clear for Windows (#42)
tonybaloney 5ecc8cd
Fix word wrap not being enabled in Windows Terminal
DinoV 5bb90c7
Fix issues with inputs longer than a single line
DinoV 35557dd
Resize WIP
DinoV e04699f
Use vt100 scrolling to avoid race conditions on resize
DinoV 6230400
More win api cleanup
DinoV 70a9a31
Code cleanup
DinoV 4adfe77
Reformat
DinoV 9c00bd1
Annotations
DinoV dc7ec86
Update news
DinoV 79a3fb9
Update history
DinoV 3e4fe55
Initial test cases
DinoV 38800e7
📜🤖 Added by blurb_it.
blurb-it[bot] b3f7092
Fix mypy and formatting issues
DinoV a589321
More mypy fixes
DinoV 9a34d8a
More MyPy
DinoV f8a9176
More MyPy fixes
DinoV ce77202
More mypy fixes, name changes in WindowsConsole
DinoV 6d8e7f5
Fix up ignores
DinoV bbbb296
Avoid kernel32 on non-Windows platforms
DinoV d064124
Formatting
DinoV f244a0e
Merge remote-tracking branch 'dinov/winrepl' into winrepl_control
tonybaloney 3d526ba
roll back other merge
tonybaloney b1f5688
Merge pull request #1 from tonybaloney/winrepl_control
DinoV 1146dbb
Catch more specific comment, avoid typing, fix comment
DinoV 972e7ec
Ignore type error on return of Any
DinoV 1d300e4
Merge branch 'main' of https://github.com/python/cpython into winrepl
DinoV d783dae
Don't import traceback on exception
DinoV d1289af
Remove one more TYPE_CHECKING
DinoV db191a2
Update Lib/test/test_pyrepl/test_windows_console.py
ambv fba84aa
Use _WindowsConsoleIO for output
DinoV 42e3e8e
Merge branch 'winrepl' of github.com:DinoV/cpython into winrepl
DinoV 63d854e
Remove get_abs_positon
DinoV 513a148
Fix tests on windows
DinoV File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This merged as-is which is OK, but I wanted to chip in...
There is a minimal risk of cutting out terminals that would support pyrepl on earlier versions of Windows. The "most correct" (also most soapboxy, sorry!) way to determine support for this is to just try to set
ENABLE_VIRTUAL_TERMINAL_PROCESSING
and only fall back to basic console APIs if it fails. :)There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@DHowett sounds like an improvement we can still make! Care to PR this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I can try - at the very least, it would be a great opportunity for me to learn how to build and deploy Python 🙂
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@DHowett see here and let me know if anything's missing:
https://devguide.python.org/getting-started/setup-building/#windows