[Python-de] Mencoder und popen2
Diez B. Roggisch
deets at web.de
Fre Okt 7 16:11:25 CEST 2005
> "while pin:" habe ich gewählt, weil ich annehme, dass pin == None wird,
> wenn der MEncoder Prozess beendet ist und die Pipe dabei schliesst, kann
> sein, dass ich auch da falsch liege, aber eine andere Möglichkeit zu
> prüfen, ob der Prozess fertig ist kenne ich bislang nicht.
Die Annahme ist falsch - woher soll denn wer anders einen Wert unter pin
binden?
Im TFM steht:
Popen3 and Popen4 Objects
Instances of the Popen3 and Popen4 classes have the following methods:
poll( )
Returns -1 if child process hasn't completed yet, or its return code
otherwise.
wait( )
Waits for and returns the status code of the child process. The status code
encodes both the return code of the process and information about whether it
exited using the exit() system call or died due to a signal. Functions to
help interpret the status code are defined in the os module; see section
6.1.5 for the W*() family of functions.
Also: wait() aufrufen.
MfG Diez