subprocess end

John Deas john.deas at
Sun Apr 6 13:50:51 EDT 2008


I am coding a small script to batch-convert flv files. At the core of
it, mencoder is called through

processString='mencoder -oac lavc -ovc lavc -of lavf -lavcopts
-lavfopts format=mp4 -ofps 15 -vf scale=320:240,harddup -ss '+currBegin
+' -endpos '+currEnd+' -o '+currOutput+' '+inputName

p = subprocess.Popen(processString, shell=True,stdout=subprocess.PIPE)

However, instructions following this last one do not wait for it to
complete. Is it possible to change this behaviour, so that the rest of
my script is executed only when this subprocess has finished its
execution ?



More information about the Python-list mailing list