How to run external program?

Gabriel Genellina gagsl-py at yahoo.com.ar
Sat Jan 13 08:38:25 EST 2007


"Lad" <python at hope.cz> escribió en el mensaje 
news:1168596401.191648.79440 at 38g2000cwa.googlegroups.com...

> mpeg = "mpeg.exe -i %s codec mp3  -s 320x240 %s" % (sourcefile,
> targetfile)
> stdin, stdout, stderr = os.popen3(mpeg)
> mpegresult = stdout.read()
> mpegerrors = stderr.read()
> stdin.close(); stdout.close(); stderr.close()
> print ffmpegerrors
> print ffmpegresult
> #########
>
> It works  if the sourcefile is small but if it is large( 30MB) it does
> NOT work.It hangs or the file is not converted in full.
> Any advice how I should change the program?

What do you mean by "NOT work"?
Does it "work" if you execute the same line from the command prompt?

-- 
Gabriel Genellina 






More information about the Python-list mailing list