doing successive prints without space in between

Dave Kuhlman dkuhlman at
Fri Jul 2 22:18:43 CEST 2004

Jon Perez wrote:

> I'd like to print a series of successive periods as a
> progress status in a command line script using python.
> Unforutnately, if I do a series of successive
> print ".",
> I get a space in between.  Is there any way to avoid
> this?

    import sys

The print command sends its output to sys.stdout (which you can
customize, by the way, by replacing sys.stdout with an instance of
a class containing a 'write' method; see


Dave Kuhlman

More information about the Python-list mailing list