(cmdline, cwd=None, env=None, suppress_stdout=False, suppress_stderr=False)
Like run_argv but specify a command line string instead of argv
Like run_argv but specify a command line string instead of argv
Like run_argv but specify a command line string instead of argv
def run(cmdline, cwd=None, env=None, suppress_stdout=False, suppress_stderr=False):
        '''Like run_argv but specify a command line string instead of argv'''
        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(cmdline,
                                    cwd=cwd,
                                    stdout=stdout,
                                    stderr=stderr,
                                    env=env,
                                    shell=True)
            return proc.wait()
def run ( cmdline , 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 ( cmdline , cwd = cwd , stdout = stdout , stderr = stderr , env = env , shell = True ) return proc . wait ( )