How can I know how much to read from a subprocess

spam.noam at gmail.com spam.noam at gmail.com
Mon Sep 17 19:14:56 EDT 2007


Hello,

I want to write a terminal program in pygtk. It will run a subprocess,
display everything it writes in its standard output and standard
error, and let the user write text into its standard input.

The question is, how can I know if the process wrote something to its
output, and how much it wrote? I can't just call read(), since it will
block my process.

Thanks,
Noam




More information about the Python-list mailing list