[docs] [issue23220] Documents input/output effects of how IDLE runs user code

Terry J. Reedy report at bugs.python.org
Thu Mar 10 18:24:04 EST 2016


Terry J. Reedy added the comment:

Part of this issue is the difference between typing a character at the keyboard, which produces a key event whose effect is determined by key bindings (some default, some added) and inserting a character into a Text widget, which does not produce an event (except, in some sense, \t and \n).  Whether or not a key event results in character insertion depends on key bindings.  The visual effect of inserted chars other than \t and \n is determined by the font.  (I believe I got the above right.) I believe some terminals treat chars coming over the wire the same as those typed.  I am not sure what the Win10 console is doing with control-x keystrokes.

>>> import sys; out=sys.stdout.write
# use direct write to avoid str(), repr() conversion of control chars
>>> out('\x03')
1  # The first char is an empty thin box in my IDLE.
>>> # type ^C
KeyboardInterrupt

----------

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


More information about the docs mailing list