python 获取命令行输出结果
status, output = commands.getstatusoutput("sudo rm -rf a.txt")if(not status): print("delete successfully!")status, output = commands.getstatusoutput("ls")如果命令执行成功并且返回,status为0,否则status...