printing dots in simple program while waiting
- From: John <john.m.roach@xxxxxxxxx>
- Date: Wed, 9 Jan 2008 08:48:46 -0800 (PST)
Ok, so this should be a really simple thing to do, but I haven't been
able to get it on the first few tries and couldn't find anything after
searching a bit.
what i want to do is print a 'waiting' statement while a script is
working-- the multithreading aspect isn't an issue, the printing on
the same line is. i want to print something like:
(1sec) working...
(2sec) working....
(3sec) working.....
where the 'working' line isn't being printed each second, but the dots
are being added with time.
something like:
import time
s = '.'
print 'working'
while True:
print s
time.sleep(1)
however, this doesn't work since it prints:
working
..
..
..
any suggestions?
.
- Follow-Ups:
- Re: printing dots in simple program while waiting
- From: Alex VanderWoude
- Re: printing dots in simple program while waiting
- From: Santiago Romero
- Re: printing dots in simple program while waiting
- From: Martin Marcher
- Re: printing dots in simple program while waiting
- Prev by Date: Re: sqlite fetchall breacking because decoding.
- Next by Date: Re: printing dots in simple program while waiting
- Previous by thread: sqlite fetchall breacking because decoding.
- Next by thread: Re: printing dots in simple program while waiting
- Index(es):
Relevant Pages
|