application.py 文件源码

python
阅读 32 收藏 0 点赞 0 评论 0

项目:engel 作者: Dalloriam 项目源码 文件源码
def __init__(self, debug=False):
        """
        Constructor of the Application.

        :param debug: Sets the logging level of the application
        :raises NotImplementedError: When ``Application.base_title``
        not set in the class definition.
        """
        self.debug = debug
        loglevel = logging.DEBUG if debug else logging.WARNING
        logging.basicConfig(
            format='%(asctime)s - [%(levelname)s] %(message)s', datefmt='%I:%M:%S %p', level=loglevel)

        self.processor = EventProcessor()
        self.server = EventServer(processor=self.processor)

        if self.base_title is None:
            raise NotImplementedError

        self.services = {}
        self.views = {}
        self.current_view = None

        self.register('init', lambda evt,
                      interface: self._load_view('default'))
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号