2008/7/6 Sebastian lunar Wiesner <[EMAIL PROTECTED]>: > 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 ;)
Thanks :) Mathieu -- http://mail.python.org/mailman/listinfo/python-list