Message349706
> 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 |
|
Date |
User |
Action |
Args |
2019-08-14 14:34:01 | eryksun | set | recipients:
+ eryksun, paul.moore, tim.golden, zach.ware, steve.dower, Matthijs Blom |
2019-08-14 14:34:01 | eryksun | set | messageid: <1565793241.32.0.753280493072.issue37850@roundup.psfhosted.org> |
2019-08-14 14:34:01 | eryksun | link | issue37850 messages |
2019-08-14 14:34:01 | eryksun | create | |
|