autoflush on/off

garabik-news-2005-05 at garabik-news-2005-05 at
Mon Feb 4 19:51:28 CET 2013

Jabba Laci <jabba.laci at> wrote:
> Hi,
> I'd like to set autoflush on/off in my script. I have a loop that is
> checking something and every 5 second I want to print a '.' (dot). I
> do it with sys.stdout.write and since there is no newline, it is
> buffered and not visible immediately.

My solution is sys.stdout.write('.'); sys.stdout.flush()

| Radovan Garabík |
| __..--^^^--..__    garabik @     |
Antivirus alert: file .signature infected by signature virus.
Hi! I'm a signature virus! Copy me into your signature file to help me spread!

More information about the Python-list mailing list