code: def flush(self, draw_progress=True):
      
      reset_progressbar = None
      if self._draw_progressbar and draw_progress:
        progressbar, reset_progressbar = self._draw_progressbar()
        self._buffer.append(progressbar)
  
      for line in self._buffer:
        self._outFile.write(line)
      #self._outFile.flush() needed?
      self._buffer = []
      if reset_progressbar:
        # first thing on next flush is to reset the current progressbar
        self._buffer.append(reset_progressbar)
      self._current_ticks = 0
      self._last_flush_time = time()
docs: call this at the very end, so that we can output the rest