Starting an external, independent process from a script
henriklied at gmail.com
Tue Mar 13 11:06:41 CET 2007
Unfortunately, that didn't work either.
The output is empty, I don't get a message, and I definitely don't get a
2007/3/13, rishi pathak <mailmaverick666 at gmail.com>:
> You can do something like this:
> pid = os.fork()
> if pid != 0:
> os.execl("mencoder variables here and its arguments")
> exec will replace the current child process with the given command and as
> we are doing fork the command will get executed in a child process.You can
> also use os.system there
> On 12 Mar 2007 16:13:51 -0700, Henrik Lied <henriklied at gmail.com > wrote:
> > 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!
> > --
> > http://mail.python.org/mailman/listinfo/python-list
> Rishi Pathak
> National PARAM Supercomputing Facility
> Center for Development of Advanced Computing(C-DAC)
> Pune University Campus,Ganesh Khind Road
Med vennlig hilsen,
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Python-list