def shell_out(cmd, stderr=STDOUT, cwd=None):
    if cwd is None:
        from os import getcwd
        cwd = getcwd()  # TODO do I need to normalize this on Windows

    out = check_output(cmd, cwd=cwd, stderr=stderr, universal_newlines=True)
    return _clean_output(out)
Friendlier version of check_output.
dataset/ETHPy150Open hayd/pep8radius/pep8radius/shell.py/shell_out