how do I know when popen() finishes?

Erno Kuusela erno-news at erno.iki.fi
Wed Oct 11 02:45:34 EDT 2000


>>>>> "jschmitt" == jschmitt  <jschmitt at vmlabs.com> writes:

 | how do I retrieve all the output that busyprogram produces when
 | busyprogram finishes?  Do I busy wait on f.read(), ie, wait for end of
 | file?

you know when you get EOF (ie empty string) from read(), but
i would not call it busy waiting since it can block.

 |  Does f.close() do the same thing as pclose(f)?

yes.

see also the docs:
<URL:http://www.python.org/doc/1.5.2p2/lib/os-newstreams.html>

  -- erno



More information about the Python-list mailing list