Mathieu Prevot <[EMAIL PROTECTED]>:

> it seems the script (A) finishes before the downloading ends, and the
> (B) version doesn't (wanted behavior) ... this is unexpected. What
> happens ?

"readlines" blocks, until the pipe is closed, which usually happens, if the
process dies.  

On the other hand, spawned processes are usually asynchronous, you have to
explicitly _wait_ for them.  And you're not waiting for it in example A.

Anyway, the _proper_ way to wait for a child process is ... guess what ...
the "wait" method of the Popen object ;)


-- 
Freedom is always the freedom of dissenters.
                                      (Rosa Luxemburg)
--
http://mail.python.org/mailman/listinfo/python-list

Reply via email to