14 条回复 • 1970-01-01 08:00:00 +08:00
|
1
dxjdhm 2013 年 9 月 5 日
一般的框架,可以打开debug选项吧;打开后就能实现你说的功能!
|
|
2
est 2013 年 9 月 5 日 |
|
3
aurorawu 2013 年 9 月 5 日
debug=True
|
|
4
pengphy 2013 年 9 月 5 日
。。。生产环境这么搞 会死的吧
|
|
5
dexbol 2013 年 9 月 5 日
svn hook 如果修改的是 .py 就重启
|
|
6
dreampuf 2013 年 9 月 5 日
|
|
7
ritksm 2013 年 9 月 5 日
watchdog
|
|
8
yakczh OP @est
from bottle import run,route, Bottle app = Bottle() @route('/hello') def hello(): return "Hello World!" @route('/') def home(): article = {'name': 'A Royal Baby', 'body':'A slow news week'} return article def dev_server(): run(app, host='0.0.0.0', port=8080, debug=True) if '__main__' == __name__: from django.utils import autoreload autoreload.main(dev_server) 这样写,访问 http://localhost/hello 提示404 |
|
10
yakczh OP @est 这是http://bottlepy.org/docs/dev/ 上复制的代码
改成@app.route可以,但是每次请求控制台都报异常 return super(FixedHandler, self).log_request(*args, **kw) TypeError: super() argument 1 must be type, not classobj |
|
11
hzymyp 2013 年 9 月 5 日 via Android
bottle 可以 reloader=True
|
|
13
ericls 2013 年 9 月 22 日
django可以。。
部署的时候用uwsgi吧 可以自动reload |
推荐学习书目
› 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