[issue40738] backspace character \b not processed by IDLE

Stan Hendryx report at bugs.python.org
Sat May 23 12:24:14 EDT 2020


Stan Hendryx <stan at hendryxassoc.com> added the comment:

Hello Terry,

Thank you for your reply. I understand there are different interpretations of \b. IMHO, since IDLE is part of a python distribution, IDLE needs to be consistent with the native python interpreter on each platform. On Mac, IDLE gives
>>> print("deleted\b file")
deleted file

whereas on mac Terminal we get 
>>> print("deleted\b file")
delete file

JetBrains gives another vote for the native interpretation. I’ve been tutoring my grandson on python using JetBrains Academy’s python tutorials. 
They teach 
>>> print("deleted\b file")
delete file

That’s how I discovered the inconsistency.

Thank you,

Stan Hendryx

> On May 22, 2020, at 7:29 PM, Terry J. Reedy <report at bugs.python.org> wrote:
> 
> 
> Terry J. Reedy <tjreedy at udel.edu> added the comment:
> 
> I am considering terminal simulation as an option, but there is not exactly a standard to emulate.  \b originally meant the same as the typewrite backspace and modern US computer keyboard left arrow key <- (move cursor left without erasing), which would result in 'delete filed' in insert mode, but sometimes now is interpreted the same as modern US computer keyboard backspace (erase and move left), as you expect.
> 
> ----------
> resolution:  -> duplicate
> stage:  -> resolved
> status: open -> closed
> superseder:  -> IDLE: Document how Shell displays user code output
> 
> _______________________________________
> Python tracker <report at bugs.python.org>
> <https://bugs.python.org/issue40738>
> _______________________________________

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue40738>
_______________________________________


More information about the Python-bugs-list mailing list