cursor positioning
Available news archives: comp.lang.tcl - comp.lang.python - comp.security.firewalls - sci.crypt - comp.lang.php - comp.lang.javascript
Google
 
Web news.hping.org


comp.lang.python archive

cursor positioning

From: Mage <mage@mage.hu>
Date: Mon Jul 11 2005 - 15:29:41 CEST

         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 screen? Curses starts with clearing the whole screen and it is
overkill. Many modules are on the net but I would like to resolve this
simply task with native python.

I tried:

for something:
    print chr(8)*20+mystring,

but it is nasty and didn't work well.

          Mage
Received on Thu Sep 29 16:52:39 2005