how to capture os.execvp into variable

s99999999s2003 at s99999999s2003 at
Tue Mar 28 05:39:51 CEST 2006

i am using this code to run a ps command in unix

def run(program, *args):
    pid = os.fork()
    if not pid:
        os.execvp(program, (program,) +  args)
    return os.wait()[0]

run("ps", "-eo pid,ppid,args")

It runs fine, but i wish to store the results into a
can i do this ? I tried
to put ret=os.execvp(program, (program,) +  args) but ret has no value

More information about the Python-list mailing list