Problems with os.spawnv

Henrik Lied henriklied at gmail.com
Thu Apr 5 18:25:35 EDT 2007


On Apr 6, 12:09 am, "Gabriel Genellina" <gagsl-... at yahoo.com.ar>
wrote:
> En Thu, 05 Apr 2007 18:53:04 -0300, Henrik Lied <henrikl... at gmail.com>
> escribió:
>
> > On Apr 5, 11:39 pm, "Gabriel Genellina" <gagsl-... at yahoo.com.ar>
> > wrote:
> >>      v = os.spawnl(os.P_NOWAIT, "mencoder", "mencoder",
> >> "/Users/henriklied/test.mov", "-ofps", "25", "-o", "...")
>
> > Thanks for your reply - but I'm afraid to tell you that spawnl didn't
> > do the trick either.
> > Here's the full command I used:http://dpaste.com/hold/7982/
>
> What means "didnt do the trick"? Do you get an exception? what's the
> returned value?
> Does the command work OK from the console?
> Try from the python interpreter, using P_WAIT, and inspect the returned
> value.
That's what I've done. P_WAIT returned a the PID 127 - but there's
still no sign of the FLV-file, I'm afraid.


>
> > I'd still love to get a working example of my problem using the
> > Subprocess module. :-)
>
> The same thing:
> p = subprocess.Popen(["mencoder", "/users/...", "-ofps", ...])
>

That example looked great at first, but on a closer look it didn't
quite end up to be what I wanted. In a real environment the user still
had to wait for the command to finish.

> --
> Gabriel Genellina



I'm not sure what to do. I'm thinking of simply creating a crontab
which checks the database every five minutes or so, and converts the
videos that aren't converted.

But if anyone has a good and easy solution in Python, I'd rather have
that. I dare to think that people here will understand that.




More information about the Python-list mailing list