Re: cursor positioning

2005-07-12 Thread Mage
Danny Milosavljevic wrote: >Hi, > > > >Examples > ESC[2JESC[H same as "clear", clear screen, go home > \rESC[Kprogress %dprobably what you want :) > > Well, like the good old Commodore times :) Thank you. Mage -- http://mail.python.org/mailman/listinfo/python-list

Re: cursor positioning

2005-07-11 Thread Danny Milosavljevic
Hi, On Mon, 11 Jul 2005 15:29:41 +0200, Mage wrote: > Dear All, > > I am writing a database import script in python and I would like to > print the percentage of the process to the last line. I would like to > update the last line at every percent. You know what I mean. > > How can the

Re: cursor positioning

2005-07-11 Thread Jeff Epler
Here's a simple module for doing progress reporting. On systems without curses, it simply uses "\r" to return the cursor to the first column. On systems with curses, it also clears to the end of the line. This means that when the progress message gets shorter, there aren't droppings left from the

Re: cursor positioning

2005-07-11 Thread Mage
James Carroll wrote: >I haven't tried this myself, but I think the secret to displaying a >continuously updating %done on the command line is to >print "file 100, 1% done" > >then send exactly 7 backspaces to the terminal, then print 2% done... >so the backspaces will write over the previous t

Re: cursor positioning

2005-07-11 Thread James Carroll
o: python-list@python.org > Subject: Re: cursor positioning > > Larry Bates wrote: > > >While not "curses" based this class will update screen as you > >want. You could use it as a basis upon which to do a curses > >version with your cursor pos

RE: cursor positioning

2005-07-11 Thread Albert Leibbrandt
-Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Mage Sent: 11 July 2005 04:28 PM To: python-list@python.org Subject: Re: cursor positioning Larry Bates wrote: >While not "curses" based this class will update screen as you >want. You c

Re: cursor positioning

2005-07-11 Thread Mage
Larry Bates wrote: >While not "curses" based this class will update screen as you >want. You could use it as a basis upon which to do a curses >version with your cursor positioning. > >http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/299207 > > > Than

Re: cursor positioning

2005-07-11 Thread Larry Bates
While not "curses" based this class will update screen as you want. You could use it as a basis upon which to do a curses version with your cursor positioning. http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/299207 -Larry Bates Mage wrote: > Dear All, >

cursor positioning

2005-07-11 Thread Mage
Dear All, I am writing a database import script in python and I would like to print the percentage of the process to the last line. I would like to update the last line at every percent. You know what I mean. How can the cursor be positioned to the last line or somewhere else on the scre