V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
推荐学习书目
Learn Python the Hard Way
Python Sites
PyPI - Python Package Index
http://diveintopython.org/toc/index.html
Pocoo
值得关注的项目
PyPy
Celery
Jinja2
Read the Docs
gevent
pyenv
virtualenv
Stackless Python
Beautiful Soup
结巴中文分词
Green Unicorn
Sentry
Shovel
Pyflakes
pytest
Python 编程
pep8 Checker
Styles
PEP 8
Google Python Style Guide
Code Style from The Hitchhiker's Guide
hellotest
V2EX  ›  Python

python web 展示执行过程

  •  
  •   hellotest · 2016-09-27 10:28:31 +08:00 · 2133 次点击
    这是一个创建于 2774 天前的主题,其中的信息可能已经有所发展或是发生改变。
    在系统中执行一个 py 脚本 想把这个脚本的执行过程实时通过 web 输出出来,目前用的是 flask 框架,是否有好的处理方式,谢谢

    是实时展示,就是执行一行,显示一行,而不是展示命令执行的结果

    谢谢
    cheetah
        1
    cheetah  
       2016-09-27 10:30:46 +08:00 via iPhone
    flask-socket
    cheetah
        2
    cheetah  
       2016-09-27 10:31:43 +08:00 via iPhone
    hellotest
        3
    hellotest  
    OP
       2016-09-27 10:58:34 +08:00
    @cheetah 这个能解决吗? 我查了相关资料,没看到具体方式啊
    cheetah
        4
    cheetah  
       2016-09-27 11:23:57 +08:00
    @hellotest 你需要先了解下 websocket
    yanzixuan
        5
    yanzixuan  
       2016-09-27 11:52:03 +08:00
    没人推荐 flask-socketio 么。。
    hellotest
        6
    hellotest  
    OP
       2016-09-27 14:28:49 +08:00
    @yanzixuan 恩 这个模块好像资料更多啊
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   851 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 24ms · UTC 19:28 · PVG 03:28 · LAX 12:28 · JFK 15:28
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.