def _run_cmd(args, cwd):
    p = subprocess.Popen(
        args, stdin=subprocess.PIPE, stdout=subprocess.PIPE,
        stderr=subprocess.PIPE, cwd=cwd)
    streams = tuple(s.decode('latin1').strip() for s in p.communicate())
    for stream_content in streams:
        print(stream_content)
    return (streams) + (p.returncode,)
Run the command args in cwd.
dataset/ETHPy150Open blue-yonder/pyscaffold/pyscaffold/contrib/pbr/pbr/tests/base.py/_run_cmd