路由设置:
#(\w+)表1至多个,(\w*)表0至多个 #(?P<p1>\w+)表 w+ 代表的字符 的名字为p1 (r‘/nsn/(\w+)/(\w+)/(\w+)‘, index.NsnHandler)
代码:
from tornado.web import RequestHandler class NsnHandler(RequestHandler): def get(self,u1,u2,u3): print(u1+"-"+u2+"-"+u3) self.write("u123")