def cursorAtSpaceEnd(block):
            cursor = QTextCursor(block)
            cursor.setPosition(block.position() + len(blockIndentation(block)))
            return cursor
def bufferedMode(self, mode = True):
        if mode is None:
            self.flush()
        self._bufferedMode = mode