Re: Terminal application with non-standard print

2010-01-27 Thread Rémi
On 25 jan, 23:30, Sean DiZazzo wrote: > On Jan 24, 11:27 am, Rémi wrote: > > > > > Hello everyone, > > > I would like to do a Python application that prints data to stdout, but > > not the common way. I do not want the lines to be printed after each > > other, but the old lines to be replaced wit

Re: Terminal application with non-standard print

2010-01-25 Thread Sean DiZazzo
On Jan 24, 11:27 am, Rémi wrote: > Hello everyone, > > I would like to do a Python application that prints data to stdout, but > not the common way. I do not want the lines to be printed after each > other, but the old lines to be replaced with the new ones, like wget > does it for example (when d

Re: Terminal application with non-standard print

2010-01-25 Thread Grant Edwards
On 2010-01-25, Hans Mulder wrote: > Grant Edwards wrote: >> On 2010-01-24, R?mi wrote: >> >>> I would like to do a Python application that prints data to stdout, but >>> not the common way. I do not want the lines to be printed after each >>> other, but the old lines to be replaced with the new

Re: Terminal application with non-standard print

2010-01-25 Thread Hans Mulder
Grant Edwards wrote: On 2010-01-24, R?mi wrote: I would like to do a Python application that prints data to stdout, but not the common way. I do not want the lines to be printed after each other, but the old lines to be replaced with the new ones, like wget does it for example (when downloadin

Re: Terminal application with non-standard print

2010-01-24 Thread Rémi
My apologies, I did not run the lines properly. Thanks, that works great now. If I understand well, \r erases the last line. How about erasing the previous lines? For example when writing sys.stdout.write("1\n2\n") sys.stdout.write("\r3") the "1" is still visible. -- Rémi On 24 jan, 20:53, Gra

Re: Terminal application with non-standard print

2010-01-24 Thread Grant Edwards
On 2010-01-24, R?mi wrote: > Thank you for your answer, but that does not work: Works fine for me. > the second line is printed after the first one. Not when I run it. There's not much more I can say given the level of detail you've provided. -- Grant -- http://mail.python.org/mailman/li

Re: Terminal application with non-standard print

2010-01-24 Thread Rémi
Thank you for your answer, but that does not work : the second line is printed after the first one. -- Rémi Grant Edwards wrote: On 2010-01-24, R?mi wrote: I would like to do a Python application that prints data to stdout, but not the common way. I do not want the lines to be printed afte

Re: Terminal application with non-standard print

2010-01-24 Thread Grant Edwards
On 2010-01-24, R?mi wrote: > I would like to do a Python application that prints data to stdout, but > not the common way. I do not want the lines to be printed after each > other, but the old lines to be replaced with the new ones, like wget > does it for example (when downloading a file you can

Terminal application with non-standard print

2010-01-24 Thread Rémi
Hello everyone, I would like to do a Python application that prints data to stdout, but not the common way. I do not want the lines to be printed after each other, but the old lines to be replaced with the new ones, like wget does it for example (when downloading a file you can see the percentage