how to handle command line output(not terminal handle)

L

Leon

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
 
G

Grant Edwards

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()
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,734
Messages
2,569,441
Members
44,832
Latest member
GlennSmall

Latest Threads

Top