Пример #1
0
 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)))
Пример #2
0
 def object(self, obj):
     #self.write(obj) 
     self.write(escape(unicode(obj)))