(self, block)
Insert a block of code with the current tab level.

    This will add the required leading white space to the line.
Insert a block of code with the current tab level.
Insert a block of code with the current tab level .
def Code(self, block):
    """Insert a block of code with the current tab level.

    This will add the required leading white space to the line.
    """
    # Break the code block into each line of code
    lines = block.split('\n')

    for line in lines:
      # Right-strip the line to avoid trailing white space. We do this on the
      # full string so that tabbing will be removed if a blank line was added.
      new_line = (_INDENTATION * self._tab_level) + line
      self._lines.append(new_line.rstrip())
def Code ( self , block ) : # Break the code block into each line of code lines = block . split ( '\n' ) for line in lines : # Right-strip the line to avoid trailing white space. We do this on the # full string so that tabbing will be removed if a blank line was added. new_line = ( _INDENTATION * self . _tab_level ) + line self . _lines . append ( new_line . rstrip ( ) )