h2o-py/h2o/utils/progressbar.py
def _draw(self, txt, final=False):
        """Print the rendered string to the stdout."""
        if not self._file_mode:
            # If the user presses Ctrl+C this ensures we still start writing from the beginning of the line
            sys.stdout.write("\r")
        sys.stdout.write(txt)
        if final and not isinstance(self._widget, _HiddenWidget):
            sys.stdout.write("\n")
        else:
            if not self._file_mode:
                sys.stdout.write("\r")
            sys.stdout.flush()
def _draw(self, txt, final=False):
        """Print the rendered string to the stdout."""
        if not self._file_mode:
            # If the user presses Ctrl+C this ensures we still start writing from the beginning of the line
            sys.stdout.write("\r")
        sys.stdout.write(txt)
        if final and not isinstance(self._widget, _HiddenWidget):
            sys.stdout.write("\n")
        else:
            if not self._file_mode:
                sys.stdout.write("\r")
            sys.stdout.flush()
Print the rendered string to the stdout.