how to handle command line output(not terminal handle)

Grant Edwards grante at visi.com
Wed Nov 3 22:45:47 EST 2004


On 2004-11-04, Leon <square690410 at yahoo.com.tw> wrote:
> such as :
> c:\>python test.py
> ##Interval 1 seconds the "name" change next
> friend : name
>
> don't have to run clear,the "name" dynamic change content
> and "friend" is stable 

I'm not sure what you're asking.  I'm not even sure if you are
asking a question.  

On the off chance I have have guessed what you're trying to do,
try running this:

import sys,time
while True:
    time.sleep(1)
    sys.stdout.write("\rTime: %f" % time.time())
    sys.stdout.flush()



-- 
Grant Edwards                   grante             Yow!  In Newark the
                                  at               laundromats are open 24
                               visi.com            hours a day!



More information about the Python-list mailing list