当前位置: 首页>>代码示例>>Python>>正文


Python Delegator.__init__方法代码示例

本文整理汇总了Python中idlelib.Delegator.Delegator.__init__方法的典型用法代码示例。如果您正苦于以下问题:Python Delegator.__init__方法的具体用法?Python Delegator.__init__怎么用?Python Delegator.__init__使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在idlelib.Delegator.Delegator的用法示例。


在下文中一共展示了Delegator.__init__方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: __init__

# 需要导入模块: from idlelib.Delegator import Delegator [as 别名]
# 或者: from idlelib.Delegator.Delegator import __init__ [as 别名]
 def __init__(self, glpane, staterefs, delegate = None, lexmods = {}):
     #e rename glpane?
     #e type of staterefs? [just an external dict, as of 061116 calling code; the 'refs' in the name is to remind you it's not owned]
     #e rules/lexenv too?
     #e ipath? [061116: no, that's separate, tho if we end up splitting it by state-layer,
     #    we might have to change that, or let env have ipaths per layer with the separately-passed one relative to all those ]
     self.glpane = glpane
     self.staterefs = staterefs ###k
     ###KLUGES, explained below [061028]:
     Delegator.__init__(self, delegate) # this will be None or the parent env
     for k,v in lexmods.iteritems():
         setattr(self, k,v) # worst part of the kluge -- dangerous if symnames overlap method names
         # next worst part: special methods like __repr__ end up delegating
     pass
开发者ID:alaindomissy,项目名称:nanoengineer,代码行数:16,代码来源:widget_env.py

示例2: __init__

# 需要导入模块: from idlelib.Delegator import Delegator [as 别名]
# 或者: from idlelib.Delegator.Delegator import __init__ [as 别名]
    def __init__(self, ext):
        Delegator.__init__(self)
        self.ext = altext(ext)
        self.prog = regex.compile(make_pat(ext), flags=regex.S|regex.M)

        try:
            self.lang = getattr(__import__('languages'+ext), ext[1:])
            if hasattr(self.lang, 'read_twice'):
                self.read_twice = self.lang.read_twice
            else:
                self.read_twice = None

            self.more_decorate = {}
            if hasattr(self.lang, 'more_decorate'):
                self.more_decorate = self.lang.more_decorate

        except Exception as e:
            self.lang = None
            self.read_twice = None
        finally:
            self.LoadTagDefs()
开发者ID:rsk0315,项目名称:papyrus,代码行数:23,代码来源:ColorDelegator.py

示例3: __init__

# 需要导入模块: from idlelib.Delegator import Delegator [as 别名]
# 或者: from idlelib.Delegator.Delegator import __init__ [as 别名]
 def __init__(self):
     Delegator.__init__(self)
     self.prog = prog
     self.idprog = idprog
     self.asprog = asprog
     self.LoadTagDefs()
开发者ID:AndyPanda95,项目名称:python-for-android,代码行数:8,代码来源:ColorDelegator.py

示例4: __init__

# 需要导入模块: from idlelib.Delegator import Delegator [as 别名]
# 或者: from idlelib.Delegator.Delegator import __init__ [as 别名]
 def __init__(self):
     Delegator.__init__(self)
     self.reset_undo()
开发者ID:billtsay,项目名称:win-demo-opcua,代码行数:5,代码来源:UndoDelegator.py

示例5: __init__

# 需要导入模块: from idlelib.Delegator import Delegator [as 别名]
# 或者: from idlelib.Delegator.Delegator import __init__ [as 别名]
 def __init__(self, name):
     self.name = name
     Delegator.__init__(self, None)
开发者ID:0xcc,项目名称:pyston,代码行数:5,代码来源:Percolator.py

示例6: __init__

# 需要导入模块: from idlelib.Delegator import Delegator [as 别名]
# 或者: from idlelib.Delegator.Delegator import __init__ [as 别名]
 def __init__(self, line_number_instance):
     Delegator.__init__(self)
     self.ext = line_number_instance
开发者ID:CWade3051,项目名称:Py,代码行数:5,代码来源:LineNumbers.py

示例7: __init__

# 需要导入模块: from idlelib.Delegator import Delegator [as 别名]
# 或者: from idlelib.Delegator.Delegator import __init__ [as 别名]
 def __init__(self):
     Delegator.__init__(self)
     self.prog = re.compile(make_pat(), re.S)
     self.idprog = re.compile(r"\s+(\w+)", re.S)
     self.LoadTagDefs()
开发者ID:Lysovenko,项目名称:OTRS_US,代码行数:7,代码来源:ttext.py

示例8: __init__

# 需要导入模块: from idlelib.Delegator import Delegator [as 别名]
# 或者: from idlelib.Delegator.Delegator import __init__ [as 别名]
 def __init__(self, callback):
     Delegator.__init__(self)
     self.callback = callback
     self.paste = False
开发者ID:CWade3051,项目名称:Py,代码行数:6,代码来源:MultiLineRun.py


注:本文中的idlelib.Delegator.Delegator.__init__方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。