StreamIndenter

(class from pyomo.common.formatting)

class pyomo.common.formatting.StreamIndenter(ostream, indent='    ')[source]

Bases: object

Mock-up of a file-like object that wraps another file-like object and indents all data using the specified string before passing it to the underlying file. Since this presents a full file interface, StreamIndenter objects may be arbitrarily nested.

__init__(ostream, indent='    ')[source]

Methods

__init__(ostream[, indent])

write(data)

writelines(sequence)

Member Documentation