(argv, cwd=None, env=None, suppress_stdout=False, suppress_stderr=False)
Run a program and wait it to finish, and return its exit code. The
        standard output of this program is supressed.
Run a program and wait it to finish, and return its exit code. The
        standard output of this program is supressed.
Run a program and wait it to finish and return its exit code . The standard output of this program is supressed .
def run_argv(argv, cwd=None, env=None, suppress_stdout=False, suppress_stderr=False):
        '''Run a program and wait it to finish, and return its exit code. The
        standard output of this program is supressed.

        '''
        with open(os.devnull, 'w') as devnull:
            if suppress_stdout:
                stdout = devnull
            else:
                stdout = sys.stdout

            if suppress_stderr:
                stderr = devnull
            else:
                stderr = sys.stderr

            proc = subprocess.Popen(argv,
                                    cwd=cwd,
                                    stdout=stdout,
                                    stderr=stderr,
                                    env=env)
            return proc.wait()
def run_argv ( argv , cwd = None , env = None , suppress_stdout = False , suppress_stderr = False ) : with open ( os . devnull , 'w' ) as devnull : if suppress_stdout : stdout = devnull else : stdout = sys . stdout if suppress_stderr : stderr = devnull else : stderr = sys . stderr proc = subprocess . Popen ( argv , cwd = cwd , stdout = stdout , stderr = stderr , env = env ) return proc . wait ( )