def check_output(cmd):
if hasattr(subprocess, '<STR_LIT>'):<EOL><INDENT>return subprocess.check_output(cmd)<EOL><DEDENT>proc = subprocess.Popen(cmd, stdout=subprocess.PIPE)<EOL>stdout = proc.communicate()[<NUM_LIT:0>]<EOL>code = proc.returncode<EOL>if code:<EOL><INDENT>raise subprocess.CalledProcessError(code, cmd)<EOL><DEDENT>return stdout<EOL>
Python 2.6 subprocess.check_output stand-in.