RE: 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

RE: cursor positioning

From: Albert Leibbrandt <albert@compuscan.co.za>
Date: Mon Jul 11 2005 - 16:42:34 CEST

-----Original Message-----
From: python-list-bounces+albert=compuscan.co.za@python.org
[mailto:python-list-bounces+albert=compuscan.co.za@python.org] 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 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
>
>
>
Thank you. This is good for displaying the percentage.
However it fails to display this:
100 files read
200 files read
300 files read
....

of course all in the same line and not under the last line.

       Mage

-- 
Why not use something like this?
counter = 0
while 1:
    if (counter % 100) == 0:
        print'%s files read '%counter
    counter += 1
Received on Thu Sep 29 16:52:42 2005