html.py 文件源码

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

项目:CritterEvolution 作者: apockill 项目源码 文件源码
def __init__(self,data,globals=None,locals=None,loader=None,**params):
        gui.Document.__init__(self,**params)
        # This ensures that the whole HTML document is left-aligned within
        # the rendered surface.
        self.style.align = -1

        _globals,_locals = globals,locals

        if _globals == None: _globals = {}
        if _locals == None: _locals = {}
        self._globals = _globals
        self._locals = _locals

        #font = gui.theme.get("label","","font")
        if (htmllib):
            # The constructor is slightly different
            p = _html(None, 0)
        else:
            p = _html()
        p.init(self,self.style.font,self.style.color,_globals,_locals,
               loader=loader)
        p.feed(data) 
        p.close() 
        p.mydone()
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号