:rtype: (int, str or unicode)
:raises OSError: if there are problems running the command
command_line = [command]
command_line.extend(arguments)
print((" ".join(command_line)))
try:
result = check_output(command_line, stderr=STDOUT)
After Change
with TemporaryFile(mode="w+", suffix="log") as stdouterr:
result = execute(command, arguments,
stdout=stdouterr, stderr=stdouterr)
stdouterr.seek(0)
log = stdouterr.readlines()
return (result, log)