Re: Backspace does not erase in stdout

2011-12-06 Thread Grant Edwards
On 2011-12-06, Nobody wrote: > On Mon, 05 Dec 2011 16:23:55 +, Grant Edwards wrote: > >>> 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. >

Re: Backspace does not erase in stdout

2011-12-06 Thread Roy Smith
In article , Rick Johnson wrote: > *Wise Observer Speculates:* Why on earth are we "21st century slaves" > to an archaic mid 20th century technology that punches holes in paper > tape? Anyone? Or to an archaic mid 20th century technology that limited lines to 80 characters? -- http://mail.py

Re: Backspace does not erase in stdout

2011-12-06 Thread Roy Smith
In article , Nobody wrote: > On Mon, 05 Dec 2011 16:23:55 +, Grant Edwards wrote: > > >> 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 > > ye

Re: Backspace does not erase in stdout

2011-12-06 Thread Chris Angelico
On Wed, Dec 7, 2011 at 12:21 AM, Rick Johnson wrote: > *Wise Observer Speculates:* Why on earth are we "21st century slaves" > to an archaic mid 20th century technology that punches holes in paper > tape? Anyone? > isinstance(Progress, None) > True I'm not sure. Let's see... * Manned, power

Re: Backspace does not erase in stdout

2011-12-06 Thread Rick Johnson
On Dec 6, 3:27 am, Nobody wrote: > On Mon, 05 Dec 2011 16:23:55 +, Grant Edwards wrote: > >> 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 > > year

Re: Backspace does not erase in stdout

2011-12-06 Thread Nobody
On Mon, 05 Dec 2011 16:23:55 +, Grant Edwards wrote: >> 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. ... before which, it was BS-DEL-BS. D

Re: Backspace does not erase in stdout

2011-12-05 Thread Chris Angelico
On Tue, Dec 6, 2011 at 4:40 AM, Grant Edwards wrote: > 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

Re: Backspace does not erase in stdout

2011-12-05 Thread Grant Edwards
On 2011-12-05, Steven D'Aprano wrote: > On Mon, 05 Dec 2011 16:23:55 +, Grant Edwards wrote: > >> On 2011-12-05, Chris Angelico wrote: >>> On Tue, Dec 6, 2011 at 3:09 AM, Steven D'Aprano >>> wrote: Is there a way to erase the character other than backspacing, writing a space, t

Re: Backspace does not erase in stdout

2011-12-05 Thread Steven D'Aprano
On Mon, 05 Dec 2011 16:23:55 +, Grant Edwards wrote: > On 2011-12-05, Chris Angelico wrote: >> On Tue, Dec 6, 2011 at 3:09 AM, Steven D'Aprano >> wrote: >>> >>> Is there a way to erase the character other than backspacing, writing >>> a space, then backspacing again? That feels inelegant. >>

Re: Backspace does not erase in stdout

2011-12-05 Thread Grant Edwards
On 2011-12-05, Chris Angelico wrote: > On Tue, Dec 6, 2011 at 3:09 AM, Steven D'Aprano > 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 back

Re: Backspace does not erase in stdout

2011-12-05 Thread Chris Angelico
On Tue, Dec 6, 2011 at 3:09 AM, Steven D'Aprano 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 inelega

Backspace does not erase in stdout

2011-12-05 Thread Steven D'Aprano
I have a function which reads characters from stdin and writes stars to stdout, but backspacing does not erase the stars as I expected. Tested in Python 2.6 on Linux. This will almost certainly not work on Windows. import sys, tty, termios def getpass(): fd = sys.stdin.fileno() old_sett