Пример #1
0
 def plaintext(self, strip_empty_lines=True):
     parser = HTMLToText()
     parser.feed(unicode(self))
     text = parser.get_data()
     if not strip_empty_lines:
         text = '\n'.join(filter(None, text.splitlines()))
     return text
Пример #2
0
 def plaintext(self, strip_empty_lines=True):
     parser = HTMLToText()
     parser.feed(unicode(self))
     text = parser.get_data()
     if not strip_empty_lines:
         text = '\n'.join(filter(None, text.splitlines()))
     return text
Пример #3
0
 def plaintext_traceback(self):
     # Not proud of this :)
     parser = HTMLToText()
     parser.feed(unicode(self.traceback))
     plaintext = parser.get_data()
     return plaintext
Пример #4
0
 def plaintext_traceback(self):
     # Not proud of this :)
     parser = HTMLToText()
     parser.feed(unicode(self.traceback))
     plaintext = parser.get_data()
     return plaintext