def system(command, input=None):
logger.debug("<STR_LIT>", command)<EOL>p = subprocess.Popen(command,<EOL>shell=True,<EOL>stdin=subprocess.PIPE,<EOL>stdout=subprocess.PIPE,<EOL>stderr=subprocess.PIPE,<EOL>close_fds=MUST_CLOSE_FDS)<EOL>stdoutdata, stderrdata = p.communicate(input=input)<EOL>result = stdoutdata + stderrdata<EOL>if p.returncode:<EOL><INDENT>logger.error("<STR_LIT>",<EOL>command)<EOL>logger.error("<STR_LIT>", p.returncode)<EOL>logger.error("<STR_LIT>")<EOL>logger.error(result)<EOL>sys.exit(<NUM_LIT:1>)<EOL><DEDENT>logger.info(result)<EOL>
commands.getoutput() replacement that also works on windows.

    Code mostly copied from zc.buildout.