def _flush_pending_stream(self):
        """ Flush out pending text into the widget. """
        text = self._pending_insert_text
        self._pending_insert_text = []
        buffer_size = self._control.document().maximumBlockCount()
        if buffer_size > 0:
            text = self._get_last_lines_from_list(text, buffer_size)
        text = ''.join(text)
        t = time.time()
        self._insert_plain_text(self._get_end_cursor(), text, flush=True)
        # Set the flush interval to equal the maximum time to update text.
        self._pending_text_flush_interval.setInterval(
            int(max(100, (time.time() - t) * 1000))
        )
 Flush out pending text into the widget. 
angrmanagement/vendor/qtconsole/console_widget.py