摘要: 下面是简单示例: 阅读全文
posted @ 2019-03-25 15:59 auxiaoliu 阅读(374) 评论(0) 推荐(0) 编辑
摘要: 下面是salt-ssh类接口调用示例 ssh模式: from salt.client.ssh.client import SSHClient client = SSHClient() ret = client.cmd('*','pillar.items') print(ret) agent模式: 如 阅读全文
posted @ 2019-03-25 15:43 auxiaoliu 阅读(311) 评论(0) 推荐(0) 编辑
摘要: 执行shell命令 1.supprocess 2.commands 压缩和解压文件 查看目录下所有文件 根据pid杀死进程 阅读全文
posted @ 2019-03-25 11:31 auxiaoliu 阅读(533) 评论(0) 推荐(0) 编辑
摘要: 面向对象 基础:三大特性 1.继承 2.抽象 python 抽象示例: import abc from abc import * classSClass(metaclass = abc.ABCMeta): @abstractmethod def my_print(self): pass classC 阅读全文
posted @ 2019-03-25 11:26 auxiaoliu 阅读(217) 评论(0) 推荐(0) 编辑