Starting an external, independent process from a script

Henrik Lied henriklied at gmail.com
Tue Mar 13 05:45:28 EDT 2007


I've tried os.spawnv and os.spawn, but these give no error and no
result.


Henrik Lied skreiv:
> Hi there!
>
> I'm trying to create a video uploading service (just to learn). The
> system is mostly based on Django, but the question I'm looking an
> answer for is more related to Python.
>
> So, the user gets to upload a video file. This can either be a mpg,
> avi or mp4-file. When the file is saved to its location, I want to
> convert it to FLA (Flash Video). I'm currently using Mplayers
> Mencoder, and this works great. The Mencoder is retrieved through
> running os.system("mencoder variables here")
>
> The problem with this is that the user has to wait until the movie is
> done encoding until he can go around with his business. I don't look
> upon this as ideal.
>
> So - I want to spawn a new system process. I need some good pointers
> on how to do this right.
>
> Any input? :-)
>
> Thanks a lot in advance!




More information about the Python-list mailing list