This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author eryksun
Recipients Matthijs Blom, eryksun, paul.moore, steve.dower, tim.golden, zach.ware
Date 2019-08-14.14:34:01
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1565793241.32.0.753280493072.issue37850@roundup.psfhosted.org>
In-reply-to
Content
> I did not observe this behaviour on WSL, which is why I think 
> this is a bug.

WSL uses a low-level console interface in virtual-terminal mode. Python's console REPL in Windows is using the standard high-level console editing that's provided by the console host, conhost.exe, when the input mode contains ENABLE_LINE_INPUT | ENABLE_ECHO_INPUT | ENABLE_PROCESSED_INPUT. This includes input history, aliases, and command-line editing that are based on the classic doskey utility from MS-DOS. The UI is documented for NT's doskey.exe command [1], which wraps the console interfaces for command-line history and aliases.

Python's built-in REPL could use a low-level console interface like PowerShell does, and implement a readline UI that's consistent with Unix, again like PowerShell has the option to do. Depending on whether we can integrate an existing readline library, that could be a monumental undertaking. pyreadline is a high-level ctypes wrapper that implements this. Last I checked it had some issues with Unicode and wasn't being vigorously maintained, but maybe that's changed.

[1] https://docs.microsoft.com/en-us/windows-server/administration/windows-commands/doskey
History
Date User Action Args
2019-08-14 14:34:01eryksunsetrecipients: + eryksun, paul.moore, tim.golden, zach.ware, steve.dower, Matthijs Blom
2019-08-14 14:34:01eryksunsetmessageid: <1565793241.32.0.753280493072.issue37850@roundup.psfhosted.org>
2019-08-14 14:34:01eryksunlinkissue37850 messages
2019-08-14 14:34:01eryksuncreate