1 Star 0 Fork 4

漫漫下雨/devops

forked from KALI/devops 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
start_daphne.py 576 Bytes
一键复制 编辑 原始数据 按行查看 历史
#!/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 True:
next_line = process.stdout.readline()
print(next_line.strip())
if next_line == "" and process.poll() is not None:
break
if __name__ == '__main__':
listen = '0.0.0.0'
# listen = '127.0.0.1'
port = 8001
__external_cmd('/home/python372/bin/daphne -b {} -p {} devops.asgi:application'.format(listen, port))
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/skyfulzhang/devops.git
git@gitee.com:skyfulzhang/devops.git
skyfulzhang
devops
devops
master

搜索帮助

23e8dbc6 1850385 7e0993f3 1850385