class documentation

class TextBuffer(list): (source)

View In Hierarchy

List of strings. Allows you to append arbitrary pieces of text but calling get_lines() will recombine or split text into lines. Used by parsers that need to output lines but handle smaller pieces of text internally.
Method get_lines Returns a proper list of lines
Method prefix_lines Prefix each line with string 'prefix'.
def get_lines(self, end_with_newline=True): (source)
Returns a proper list of lines
def prefix_lines(self, prefix): (source)
Prefix each line with string 'prefix'.