Formats the object into a sequence of lines with indent level
information. The return value is a list where each list item is a
tuple. The first item in the tuple is an integer
representing the indentation level for that line. Any remaining items
in the tuple are strings to be output on that line.
The output of this function can be formatted into a single string by
calling nss.nss.indented\_format(), e.g.:
print indented_format(obj.format_lines())
The reason this function returns a tuple as opposed to an single
indented string is to support other text formatting systems such as
GUI's with indentation controls. See nss.nss.indented\_format() for a
complete explanation.
- Parameters:
level (integer) - Initial indentation level, all subsequent indents are relative
to this starting level.
- Returns: [(level, string),...]
|