import os def run_os_cmd(command, should_print=True): if should_print: print(command) output = os.popen(command).read() return output