Printing dots in single-line

Rainer Deyke rainerd at eldwood.com
Sat Nov 29 18:30:45 CET 2003


Alok Singhal wrote:
> Incidentally, I saw other responses, and most of them suggest
> sys.stdout.write().  Is there a reason that is preferable over the
> solution above?

Yes: the print statement is an abomination.  It is a special-case syntax for
a task that requires no special syntax, and will hopefully be deprecated in
the future, the sooner the better.

It is also not as general as sys.stdout.write.  It may be important that the
dots are printed in separate statements.  For example, the dots could be
used as a progress indicator.


-- 
Rainer Deyke - rainerd at eldwood.com - http://eldwood.com






More information about the Python-list mailing list