5 get_command_output = commands.getoutput
6 get_command_status_output = commands.getstatusoutput
10 def get_command_status_output(command):
13 return (0, subprocess.check_output(command, shell=True, universal_newlines=True))
14 except subprocess.CalledProcessError as e:
15 return (e.returncode, e.output)
17 def get_command_output(command):
18 return get_command_status_output(command)[1]
20 cmp_ = lambda x, y: (x > y) - (x < y)