Help with creating processes

Rod Person rodperson at comcast.net
Sat Jan 20 00:34:21 CET 2007


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

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

I've tried:
	 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?


- -- 


Rod

"it takes an unusual mind to see the obvious."
- - Alfred Whitehead


-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (FreeBSD)

iD8DBQFFsVWA3rDijyy3LEcRAia4AJ4hWZosgDeFeK4dkKdMg9ZwmAebeACfVqkQ
pGiJ7pL1/d1tVszxF0kzSjQ=
=Jz9+
-----END PGP SIGNATURE-----


More information about the Python-list mailing list