Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #16671

Re: Backspace does not erase in stdout

From Grant Edwards <invalid@invalid.invalid>
Newsgroups comp.lang.python
Subject Re: Backspace does not erase in stdout
Date 2011-12-05 17:40 +0000
Organization PANIX Public Access Internet and UNIX, NYC
Message-ID <jbivmm$2jl$1@reader1.panix.com> (permalink)
References <4edcecc6$0$29988$c3e8da3$5496439d@news.astraweb.com> <mailman.3305.1323101623.27778.python-list@python.org> <jbir6r$c3$1@reader1.panix.com> <4edcfe6b$0$29988$c3e8da3$5496439d@news.astraweb.com>

Show all headers | View raw


On 2011-12-05, Steven D'Aprano <steve+comp.lang.python@pearwood.info> wrote:
> On Mon, 05 Dec 2011 16:23:55 +0000, Grant Edwards wrote:
>
>> On 2011-12-05, Chris Angelico <rosuav@gmail.com> wrote:
>>> On Tue, Dec 6, 2011 at 3:09 AM, Steven D'Aprano
>>><steve+comp.lang.python@pearwood.info> wrote:
>>>>
>>>> Is there a way to erase the character other than backspacing, writing
>>>> a space, then backspacing again? That feels inelegant.
>>>
>>> Emitting "\b \b" is one very common way to do a destructive backspace.
>>> Inelegant? Perhaps, but a common inelegance.
>> 
>> That's pretty much the only way I've seen it done for the past 25 years.
>> 
>> What would be more elegant?
>
> For backspace to actually backspace, and not just move the cursor.

Ah, but "just move the cursor" is what backspace has always meant. 
It's been that way for 100 years -- since the days of typewriters and
teletypes.  ;)

> Thanks for those who answered, I guess I'll just do the backspace,
> space, backspace dance.

After thinking a while, I do remember one program I ran across
recently that when you hit backspace would erase the entire line, then
rewrite the entire line stopping one character short of where it was
before.  Even at network speeds it was noticable when the link was
encrypted.

-- 
Grant Edwards               grant.b.edwards        Yow! Inside, I'm already
                                  at               SOBBING!
                              gmail.com            

Back to comp.lang.python | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

Backspace does not erase in stdout Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2011-12-05 16:09 +0000
  Re: Backspace does not erase in stdout Chris Angelico <rosuav@gmail.com> - 2011-12-06 03:13 +1100
    Re: Backspace does not erase in stdout Grant Edwards <invalid@invalid.invalid> - 2011-12-05 16:23 +0000
      Re: Backspace does not erase in stdout Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2011-12-05 17:24 +0000
        Re: Backspace does not erase in stdout Grant Edwards <invalid@invalid.invalid> - 2011-12-05 17:40 +0000
          Re: Backspace does not erase in stdout Chris Angelico <rosuav@gmail.com> - 2011-12-06 09:00 +1100
      Re: Backspace does not erase in stdout Nobody <nobody@nowhere.com> - 2011-12-06 09:27 +0000
        Re: Backspace does not erase in stdout Rick Johnson <rantingrickjohnson@gmail.com> - 2011-12-06 05:21 -0800
          Re: Backspace does not erase in stdout Chris Angelico <rosuav@gmail.com> - 2011-12-07 01:03 +1100
          Re: Backspace does not erase in stdout Roy Smith <roy@panix.com> - 2011-12-06 09:49 -0500
        Re: Backspace does not erase in stdout Roy Smith <roy@panix.com> - 2011-12-06 09:45 -0500
        Re: Backspace does not erase in stdout Grant Edwards <invalid@invalid.invalid> - 2011-12-06 15:24 +0000

csiph-web