Ejemplo n.º 1
0
 def flatten(self):
     #create the function definition line
     buf = ["", "#static method: %(name)s" % self.__dict__]
     buf.append("def %(name)s(self, %(args)s):"%(self.__dict__))
     #normalize and indent the function text
     [buf.append('    %s' % line) for line in Helpers.normalizeScript(self.elem.text or '').split('\n')]
     return buf