예제 #1
0
 def to_string(self):
     s = TxtParser.add_newlines(self.comment_raw)
     for l in self:
         # There is the need to check for the type: only the
         # TxtRecordEntry provides a (for this method) usable
         # output.
         if isinstance(l, TxtRecordEntry):
             s += l.to_string()
         else:
             # If this is another RecordEntry, at least get some
             # infos from this.
             s += TxtRecordEntry.format_entry(l)
     return s
예제 #2
0
 def to_string(self):
     s = TxtParser.add_newlines(self.comment_raw)
     for l in self:
         # There is the need to check for the type: only the
         # TxtRecordEntry provides a (for this method) usable
         # output.
         if isinstance(l, TxtRecordEntry):
             s += l.to_string()
         else:
             # If this is another RecordEntry, at least get some
             # infos from this.
             s += TxtRecordEntry.format_entry(l)
     return s
예제 #3
0
 def to_string(self):
     """Return the entry as a string"""
     add_content = TxtParser.add_newlines(self.content_raw)
     add_comment = TxtParser.add_newlines(self.comment_raw)
     return self.tag_raw + add_content + add_comment
예제 #4
0
 def to_string(self):
     """Return the entry as a string"""
     add_content = TxtParser.add_newlines(self.content_raw)
     add_comment = TxtParser.add_newlines(self.comment_raw)
     return self.tag_raw + add_content + add_comment
예제 #5
0
 def to_string(self):
     add_content = TxtParser.add_newlines(self.content_raw)
     add_comment = TxtParser.add_newlines(self.comment_raw)
     r = self.tag_raw + add_content + add_comment
     return r