Steven D'Aprano <steve+pyt...@pearwood.info> added the comment:

Ctrl-C is a red-herring here. Esc-Enter alone is sufficient to switch control 
processing.

Tested in Python 2.7 and 3.9 using xfce4-terminal in Fedora:

1. Ctrl-L clears the terminal window;
2. Type Esc-Enter;
3. Ctrl-L now inserts an actual ^L (chr(12) linefeed) instead of being captured 
by the terminal and clearing the screen.

I am 80% sure this is a *terminal feature* not a Python bug, to allow you to 
insert control characters into the command line, but I can't reproduce it in 
bash or find a way to revert back to normal processing.

----------
nosy: +steven.daprano

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue43070>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to