How to capture output of os.spawnv()?

Grant Edwards grante at visi.com
Wed Feb 13 16:16:50 EST 2002


I'd like to capture stdout/stderr from a program run with
os.spawnv().  

I've searched through c.l.p archives, and the usual answer
seems to be "use popen2 et al".  I don't want to use popen
since it runs the program as a shell command and I don't want
the shell to mess with the strings I'm passing as arguments to
the programs.

I can write something using the dup2(), frok(), and execv(),
but I thought maybe something already existed somewhere...

-- 
Grant Edwards                   grante             Yow!  I'm working under
                                  at               the direct orders of WAYNE
                               visi.com            NEWTON to deport consenting
                                                   adults!



More information about the Python-list mailing list