1 Star 0 Fork 1

skygod / devops

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
start_docker.py 442 Bytes
一键复制 编辑 原始数据 按行查看 历史
leffss 提交于 2020-04-09 11:00 . optimization many
#!/usr/bin/env python
import subprocess
def __external_cmd(cmd, code="utf8"):
print(cmd)
process = subprocess.Popen(cmd, shell=True, bufsize=0, stdout=subprocess.PIPE, universal_newlines=True)
while 1:
next_line = process.stdout.readline()
print(next_line.strip())
if next_line == "" and process.poll() is not None:
break
if __name__ == '__main__':
__external_cmd('sh start_docker.sh')
1
https://gitee.com/skydong/devops.git
git@gitee.com:skydong/devops.git
skydong
devops
devops
master

搜索帮助