V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
V2EX  ›  pc10201  ›  全部回复第 17 页 / 共 17 页
回复总数  322
1 ... 8  9  10  11  12  13  14  15  16  17  
2013-12-10 21:03:35 +08:00
回复了 pc10201 创建的主题 Python python bottle框架如何在windows下用static静态文件,如css,html等
我在程序目录中新建一个static目录,放入cs.txt文件
from bottle import static_file, route, run

@route('/')
def hello():
return 'test'

@route('/static/<filename>')
def server_static(filename):
return static_file(filename, root='./static')

run(host='localhost', port='8089')

已经弄好了,代码如上
2013-09-07 15:26:41 +08:00
回复了 jasonchao 创建的主题 问与答 瘦子如何有效的增重?
人参归脾丸,补中益气丸~
1 ... 8  9  10  11  12  13  14  15  16  17  
关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   实用小工具   ·   2078 人在线   最高记录 6679   ·     Select Language
创意工作者们的社区
World is powered by solitude
VERSION: 3.9.8.5 · 14ms · UTC 12:40 · PVG 20:40 · LAX 04:40 · JFK 07:40
Developed with CodeLauncher
♥ Do have faith in what you're doing.