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
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
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
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
"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.