Printing dots in single-line
Erik Max Francis
max at alcyone.com
Sun Nov 16 19:35:07 EST 2003
Bob Gailer wrote:
> At 08:22 AM 11/13/2003, trofer at nic.nac.wdyn.de wrote:
>
> > Prints line of dots separated by a whitespace (. . . . . . etc). Is
> > there a
> > way I can get it to display them without that white space
> > (.......etc)?
>
> Try (depending on the output device)
> while 1:
> print '.\b',
A _far_ superior solution would be to simply not print the trailing
spaces in the first place:
while True:
sys.stdout.write('.')
sys.stdout.flush()
--
Erik Max Francis && max at alcyone.com && http://www.alcyone.com/max/
__ San Jose, CA, USA && 37 20 N 121 53 W && &tSftDotIotE
/ \
\__/ Love is like war: easy to begin but very hard to stop.
-- H.L. Mencken
More information about the Python-list
mailing list