2020
10-10
10-10
python利用paramiko实现交换机巡检的示例
直接上代码#-*-coding:UTF-8-*-importparamikoimporttimestarttime=time.strftime('%Y-%m-%d%T')start_info="巡检开始时间:"+str(starttime)cmd_filepath=r"d:\Python\py\xunjian\cmd.txt"cmd_file=open(cmd_filepath,"r")cmds=cmd_file.readlines()dev_filepath=r"d:\Python\py\xunjian\device_info.txt"dev_file=open(dev_filepath,"r")while1:dev_info=dev_file.readline()ifnotdev_info:br...
继续阅读 >