Help with creating processes
rodperson at comcast.net
Sat Jan 20 00:34:21 CET 2007
-----BEGIN PGP SIGNED MESSAGE-----
I'm trying to create a simple gui wrapper for the handbrake dvd ripper
with python 2.4 on a FreeBSD system.
My problem is this. I want to scan the dvd to see all the titles and
chapters. The handbrake command for this is:
handbrake -i /dev/acd0 -t 0
cmd = '/usr/local/bin/handbrake -i /dev/acd0 -t 0'
rtn = os.popen(cmd)
but the script exists before the disk has finished scanning. If I
change cmd to 'ls' it work as I expected. My problem is that the
scanning of the DVD can take upto a minute or more and os.popen doesn't
seem to wait - although I thought it was suppose to?
I've tried using subprocess.call and popen2 etc but nothing seems to
wait for the return. Can someone give me a hint?
"it takes an unusual mind to see the obvious."
- - Alfred Whitehead
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (FreeBSD)
-----END PGP SIGNATURE-----
More information about the Python-list