Output from a python script to a calling program.

Thaddeus L. Olczyk olczyk at interaccess.com
Wed Jun 21 02:38:57 EDT 2000


On Tue, 20 Jun 2000 23:29:48 GMT, "Neil Hodgson" <neilh at scintilla.org>
wrote:

>> When I call a python script from another program, I notice several
>> things.
>>
>> 1) It sort of bunches the output. Specifically it sits and waits for a
>> large block of output, then prints, stops printing, sits and waits
>> then prints the next batch.
>> 2) Sometimes it seems that parts of the output are printed in
>> different order them I would expect.
>
>   1) The -u option turns off buffering. However, performance may be lower
>without buffering.
>
>   2) You may be seeing standard output being buffered and standard error
>not being buffered. So output to standard error appears before some earlier
>output to standard output.
>
>   Neil
>
>
Yep, that did the trick. The question now is can I turn off buffering
from inside the script?



More information about the Python-list mailing list