Output from a python script to a calling program.

Neil Hodgson neilh at scintilla.org
Tue Jun 20 19:29:48 EDT 2000


> 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






More information about the Python-list mailing list