推荐学习书目
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
eraser
V2EX  ›  Python

Tornado不可以自动重新加载吗?

  •  
  •   eraser · Sep 17, 2011 · 8037 views
    This topic created in 5371 days ago, the information mentioned may be changed or developed.
    IDE用的是PyCharm 1.4.3,基于Tornado的一个项目,run以后修改的代码需要stop再run才可以生效,有没有自动重新加载的方法?
    就是达到GAE官方手册里提到的效果:
    as with the Python SDK—your app will be automatically re-built whenever you change the source.

    每次来回停止开始停止开始,蛋疼。。。好低效。。
    3 replies    1970-01-01 08:00:00 +08:00
    zxp
        1
    zxp  
       Sep 17, 2011
    settings = {
    "debug": True,
    }

    app = tornado.web.Application([
    ('/', MainHandler),
    .....
    ], **settings)
    eraser
        2
    eraser  
    OP
       Sep 17, 2011
    @zxp 多谢! it works!!!
    Livid
        3
    Livid  
    MOD
    PRO
       Sep 17, 2011
    如果是在 Linux 上,那么还可以将你的 Tornado 应用通过 supervisord 做成一个守护进程,这样只要刷浏览器就可以了,程序肯定会在后台被持续启动。

    在 Mac OS X 上的话,可以用 launchd。
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   5233 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 30ms · UTC 09:39 · PVG 17:39 · LAX 02:39 · JFK 05:39
    ♥ Do have faith in what you're doing.