Re: output buffering

2005-11-11 Thread JD
On 2005-11-11, Larry Bates <[EMAIL PROTECTED]> wrote: > This is something I wrote that might help. > > http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/299207 > The solutions become better and better. Thanks. > -Larry Bates > > JD wrote: >> Hello, >> >> When reading a large datafile, I wa

Re: output buffering

2005-11-11 Thread Larry Bates
This is something I wrote that might help. http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/299207 -Larry Bates JD wrote: > Hello, > > 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 ther

Re: output buffering

2005-11-11 Thread skip
jd> When reading a large datafile, I want to print a '.' to show the jd> progress. This fails, I get the series of '.'s after the data has jd> been read. Is there a trick to fix this? As Fredrik indicated, you need to flush the output buffer. You might also want to check out the prog

Re: output buffering

2005-11-11 Thread JD
On 2005-11-11, Fredrik Lundh <[EMAIL PROTECTED]> wrote: > "JD" <[EMAIL PROTECTED]> 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 p

Re: output buffering

2005-11-11 Thread Fredrik Lundh
"JD" <[EMAIL PROTECTED]> 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.