"""
自定义错误页面
"""
class errorController(userController):
def get(self):
self.write('404 not found');
def post(self):
errorController.get(self);
怎么实现类型这样的效果:
"""
自定义错误页面
"""
class errorController(userController):
def get(self):
def post(self):
def delete(self):
# options put ......
self.write('404 not found/ method not allowed');
然后是关于class继承
class a():
def __init__():
pass;
class b(a):
def __init__():
pass;
像php有parant::__init()__可以执行继承的class的同名方法。python捏?
还有就是像
class baseController(tornado.web.RequestHandler):
class userController(baseController):
class panelController(userController):
# 然后就莫名其妙500了……
然后是怎么动态加载一些python文件,比如:
a = 'a';
import a;
# 但是即便实现了好像也没用,python貌似所有执行过程中需要的文件都需要预先import……
# 像php if($get[a]) include_once $get[a].php
暂时这么多……