On Fri, 15 Aug 2008 09:47:34 -0500, Grant Edwards wrote:
> When I ssh in to my Windows XP box and run Python apps, output
> from "print" and and "sys.stdout.write()" is being buffered so
> that none of the output shows up until the program exits.
>
> From wi
On 2008-08-15, Grant Edwards <[EMAIL PROTECTED]> wrote:
>> I'm not sure you can do that from within the program [1]; to
>> do it from the outside, set the PYTHONUNBUFFERED environment
>> variable to something, or pass "-u" to the interpreter.
>
> I had seen references to PYTHONUNBUFFERED in my Goo
up until the program exits.
>>
>>>From within my program how do I set output buffering to either
>> line-buffered or un-buffered? [I'm looking for the equivalent
>> of the C stdio "setbuf" call.]
>
> I'm not sure you can do that from within the
Grant Edwards wrote:
When I ssh in to my Windows XP box and run Python apps, output
from "print" and and "sys.stdout.write()" is being buffered so
that none of the output shows up until the program exits.
From within my program how do I set output buffering to either
When I ssh in to my Windows XP box and run Python apps, output
from "print" and and "sys.stdout.write()" is being buffered so
that none of the output shows up until the program exits.
>From within my program how do I set output buffering to either
line-buffered or un-buff
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.
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 there a trick to fix this?
Thanks
--
http://mail.python.org/mailman/listinfo/python-list
11 matches
Mail list logo