[issue18597] On Windows sys.stdin.readline() doesn't handle Ctrl-C properly

Eryk Sun report at bugs.python.org
Thu Oct 6 09:53:44 EDT 2016


Eryk Sun added the comment:

Switching to ReadConsoleW in 3.6+ solves the problem with not seeing ERROR_OPERATION_ABORTED in Windows 8+, and with proper handling this potentially solves issues with Ctrl+C handling (when I last checked there were still bugs with this in the 3.6 beta). However, the problem still exists in 2.7 and 3.5, where the only possible solution is to switch to ReadConsoleA. Maybe once the new PyOS_StdioReadline code in 3.6 is stable, it can be backported to 3.5 using ReadConsoleA instead of ReadConsoleW. 2.7 will probably remain broken.

----------
versions:  -Python 3.3, Python 3.4, Python 3.6

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue18597>
_______________________________________


More information about the Python-bugs-list mailing list