Capturing stdout without waiting for the process end

akameswaran at gmail.com akameswaran at gmail.com
Mon Apr 3 13:37:58 EDT 2006


Diez is correct, the C program is writting to stdout, you are reading
from stdout.  Default bahavior in most modern Unix like systems is to
buffer std out.  I stumbled on this a long time ago, so I am trying to
remember the details.

What I think is happening here, you call the child process, it does
it's thing and puts thing into stdout.

How long does the child process run typically?

What also is the actual behavior?  How is it wrong, exactly?  Are you
getting the full output from the C program?  Part of it? I still
suspect a buffering problem of some sort, but I am not clear on what is
going wrong.




More information about the Python-list mailing list