Eryk Sun <> added the comment:

> For example, I would be shocked if it wasn't absolutely trivial 
> for the current implementation to add auto-indenting following 
> a colon. That feature alone would be a win for usability.

That would be a non-trivial change in Windows. I think it's at least possible 
using the high-level console API. It could be implemented with the 
pInputControl parameter of ReadConsoleW in combination with WriteConsoleW. This 
is how the CMD shell implements tab completion for file paths. That said, many 
of the proposed UI enhancements cannot be implemented in Windows using the 
high-level console API. 

IPython used to depend on readline. (5.0 switched to prompt_toolkit instead.) 
In Windows this was via the pyreadline package, which uses the low-level 
console API via ctypes. pyreadline is apparently abandoned (last updated in 
2015). Maybe CPython could incorporate a fork of pyreadline that fixes bugs 
(Unicode support in particular) and updates it to use a C extension instead of 

nosy: +eryksun

Python tracker <>
Python-bugs-list mailing list

Reply via email to