# python tornado读取静态文件
from tornado.web import Application, RequestHandler
from tornado.ioloop import IOLoop
import os
class IndexHandle(RequestHandler):
def get(self):
self.render('readImg.html')
app = Application(
[(r'^/$', IndexHandle)], template_path=os.path.join(os.getcwd(), 'templates'),
static_path=os.path.join(os.getcwd(), 'static', 'images')
)
app.listen(8000)
IOLoop.instance().start()
python tornado读取静态文件
最新推荐文章于 2022-11-06 00:06:00 发布