摘要: 利用commands模块执行shell命令 用Python写运维脚本时,经常需要执行linux shell的命令,Python中的commands模块专门用于调用Linux shell命令,并返回状态和结果,下面是commands模块的3个主要函数: 1. commands.getoutput('s 阅读全文
posted @ 2016-07-30 17:14 夏日花开 阅读(6530) 评论(0) 推荐(0)