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

Tornado 的 Handler 的文件是不是在启动的时候就加载到内存了?

  •  
  •   yakczh · Jun 30, 2014 · 3056 views
    This topic created in 4469 days ago, the information mentioned may be changed or developed.
    application = tornado.web.Application([
    (r"/", MainHandler),
    ('"r/xx',XxxooHandler),
    ....
    ])

    增加一个handler就得更新这个配置
    是不是程序在启动的时候会把这些对应的类文件都加载进来 ?
    1 replies  •  2014-06-30 20:25:53 +08:00
    ss098
        1
    ss098  
       Jun 30, 2014
    是的,你 import 这个文件后就开始加载了
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Privacy   ·   Solana   ·   1063 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 29ms · UTC 23:25 · PVG 07:25 · LAX 16:25 · JFK 19:25
    ♥ Do have faith in what you're doing.