Eryk Sun <eryk...@gmail.com> added the comment:
> 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 ---------- nosy: +eryksun _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue37850> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com