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
def plaintext_traceback(self): # Not proud of this :) parser = HTMLToText() parser.feed(unicode(self.traceback)) plaintext = parser.get_data() return plaintext