Pipe return mesage from spawnv to string?

Stefhan Stjärnås stefhan at hotmail.com
Thu Jun 6 08:43:29 EDT 2002


Hi!

Anyone who knows how to pipe from spawnv?
I start isql.exe with os.spawnv and must see the result.

run ("isql.exe"," -s ....")

def run (program, *args):
    """Executes program with arguments, using os.spawnv"""
    try:
        return os.spawnv(os.P_WAIT,program, (program,) +args)
    except (os.error), why:
        raise SErr, str(why)

Best regards
Stefhan



More information about the Python-list mailing list