Author ned.deily
Recipients Al.Sweigart, martin.panter, ned.deily, willingc
Date 2015-01-11.07:22:50
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1420960971.55.0.292839661098.issue23220@psf.upfronthosting.co.za>
In-reply-to
Content
It's helpful to keep in mind that IDLE is a Tk application written in Python and, as such, depends on Tk to do nearly everything associated with writing to displays and reading from keyboards and pointing devices.  If you try outputting the same string using the Tk shell, wish, you'll see exactly the same behavior as you do in IDLE:

$ wish
% .text insert 1.0 "hello\b\b\b\b\bHELLO"
% pack .text

And you'll see the same Tk platform differences.  With the native OS X Tk's, the backspace characters aren't displayed; with a Linux or OS X X11 Tk, empty box characters are displayed.  That may also depend on which font is in use.  In any case, the Tk text widget does not behave the same way in this regard as most terminal emulator windows do would do with backspace characters.  So it's up to any Tk app to figure out how it wants to deal with them.

This issue has come up before for Tkinter in general: back in 2001, effbot suggested some code to search for and edit backspace runs in Tk text.  Presumably something similar could be added to IDLE if there was general agreement that this was desirable (after verifying that it works on all of the Tk platforms that IDLE supports).  See https://mail.python.org/pipermail/python-list/2001-December/085908.html
History
Date User Action Args
2015-01-11 07:22:51ned.deilysetrecipients: + ned.deily, martin.panter, Al.Sweigart, willingc
2015-01-11 07:22:51ned.deilysetmessageid: <1420960971.55.0.292839661098.issue23220@psf.upfronthosting.co.za>
2015-01-11 07:22:51ned.deilylinkissue23220 messages
2015-01-11 07:22:50ned.deilycreate