class documentation

class PythonPrinter: (source)

View In Hierarchy

Undocumented

Method __init__ Undocumented
Method close close this printer, flushing any remaining lines.
Method start_source Undocumented
Method write_blanks Undocumented
Method write_indented_block print a line or lines of python which already contain indentation.
Method writeline print a line of python, indenting it according to the current indent level.
Method writelines print a series of lines of python.
Instance Variable backslashed Undocumented
Instance Variable in_indent_lines Undocumented
Instance Variable indent Undocumented
Instance Variable indent_detail Undocumented
Instance Variable indentstring Undocumented
Instance Variable line_buffer Undocumented
Instance Variable lineno Undocumented
Instance Variable source_map Undocumented
Instance Variable stream Undocumented
Instance Variable triplequoted Undocumented
Method _flush_adjusted_lines Undocumented
Method _in_multi_line return true if the given line is part of a multi-line block, via backslash or triple-quote.
Method _indent_line indent the given line according to the current indent level.
Method _is_unindentor return true if the given line is an 'unindentor', relative to the last 'indent' event received.
Method _reset_multi_line_flags reset the flags which would indicate we are in a backslashed or triple-quoted section.
Method _update_lineno Undocumented
Instance Variable _re_compound Undocumented
Instance Variable _re_indent Undocumented
Instance Variable _re_indent_keyword Undocumented
Instance Variable _re_space Undocumented
Instance Variable _re_space_comment Undocumented
Instance Variable _re_unindentor Undocumented
def __init__(self, stream): (source)

Undocumented

def close(self): (source)

close this printer, flushing any remaining lines.

def start_source(self, lineno): (source)

Undocumented

def write_blanks(self, num): (source)

Undocumented

def write_indented_block(self, block, starting_lineno=None): (source)

print a line or lines of python which already contain indentation. The indentation of the total block of lines will be adjusted to that of the current indent level.

def writeline(self, line): (source)

print a line of python, indenting it according to the current indent level. this also adjusts the indentation counter according to the content of the line.

def writelines(self, *lines): (source)

print a series of lines of python.

backslashed = (source)

Undocumented

in_indent_lines: bool = (source)

Undocumented

Undocumented

indent_detail: list = (source)

Undocumented

indentstring: str = (source)

Undocumented

line_buffer: list = (source)

Undocumented

Undocumented

source_map: dict = (source)

Undocumented

Undocumented

triplequoted = (source)

Undocumented

def _flush_adjusted_lines(self): (source)

Undocumented

def _in_multi_line(self, line): (source)

return true if the given line is part of a multi-line block, via backslash or triple-quote.

def _indent_line(self, line, stripspace=''): (source)

indent the given line according to the current indent level. stripspace is a string of space that will be truncated from the start of the line before indenting.

def _is_unindentor(self, line): (source)

return true if the given line is an 'unindentor', relative to the last 'indent' event received.

def _reset_multi_line_flags(self): (source)

reset the flags which would indicate we are in a backslashed or triple-quoted section.

def _update_lineno(self, num): (source)

Undocumented

_re_compound = (source)

Undocumented

_re_indent = (source)

Undocumented

_re_indent_keyword = (source)

Undocumented

_re_space = (source)

Undocumented

_re_space_comment = (source)

Undocumented

_re_unindentor = (source)

Undocumented