def _report(self): if callable(self.banner): header = self.banner() elif self.banner is not None: header = self.banner else: header = '# Output log generated on %s' % time.asctime() text = self.toPlainText() return '%s\n\n%s' % (header, text)
def _report(self): if callable(self.banner): header = self.banner() elif self.banner is not None: header = self.banner else: header = '# Output log generated on %s' % time.asctime() buf = self.get_buffer() text = buf.get_text(buf.get_start_iter(), buf.get_end_iter(), False) return '%s\n\n%s' % (header, text)