pipes like perl

infidel saint.infidel at gmail.com
Tue Aug 23 13:57:05 EDT 2005


Here's one technique I use to run an external command in a particular
module:

        stdin, stdout, stderr = os.popen3(cmd)
        stdin.close()
        results = stdout.readlines()
        stdout.close()
        errors = stderr.readlines()
        stderr.close()
        if errors:
            raise Exception(''.join(errors))

Maybe this will get you going in a better direction?




More information about the Python-list mailing list