Esempio n. 1
0
 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
Esempio n. 2
0
    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()
Esempio n. 3
0
    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()
Esempio n. 4
0
 def __init__(self):
     Delegator.__init__(self)
     self.prog = prog
     self.idprog = idprog
     self.asprog = asprog
     self.LoadTagDefs()
Esempio n. 5
0
 def __init__(self):
     Delegator.__init__(self)
     self.reset_undo()
Esempio n. 6
0
 def __init__(self, name):
     self.name = name
     Delegator.__init__(self, None)
Esempio n. 7
0
 def __init__(self, name):
     self.name = name
     Delegator.__init__(self, None)
Esempio n. 8
0
 def __init__(self, line_number_instance):
     Delegator.__init__(self)
     self.ext = line_number_instance
Esempio n. 9
0
 def __init__(self, line_number_instance):
     Delegator.__init__(self)
     self.ext = line_number_instance
Esempio n. 10
0
 def __init__(self):
     Delegator.__init__(self)
     self.prog = re.compile(self.make_pat(), re.S)
     self.idprog = re.compile(r"\s+(\w+)", re.S)
     self.LoadTagDefs()
Esempio n. 11
0
 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()
Esempio n. 12
0
 def __init__(self, callback):
     Delegator.__init__(self)
     self.callback = callback
     self.paste = False