def cursorAtSpaceEnd(block):
            cursor = QTextCursor(block)
            cursor.setPosition(block.position() + len(blockIndentation(block)))
            return cursor
def close(self):
        super(QueueingLogHandler, self).close()
        self._queue.put_nowait(None)