sh模块可以实现在linux服务器上运行命令,不支持windows系统

安装

pip install sh

例子1

>>> import sh
>>> sh.echo("hi")
hi

例子2

import sh
sh.ssh("root@10.1.1.1 pwd")

 

posted on 2021-04-18 06:08  longfei2021  阅读(64)  评论(0编辑  收藏  举报