output buffering

Fredrik Lundh fredrik at pythonware.com
Fri Nov 11 04:45:47 EST 2005


"JD" <jd at something.com> wrote:

> When reading a large datafile, I want to print a '.' to show the
> progress. This fails, I get the series of '.'s after the data has been
> read. Is there a trick to fix this?

assuming that you're printing to stdout,

    sys.stdout.flush()

should do the trick.

</F> 






More information about the Python-list mailing list