def repr_attribute(self, attrs, name): if name[:2] != '__': value = getattr(attrs, name) if name.endswith('_'): name = name[:-1] return u' %s="%s"' % (name, escape(unicode(value)))
def object(self, obj): #self.write(obj) self.write(escape(unicode(obj)))