diff --git a/progress/helpers.py b/progress/helpers.py index 5cf66f1..530927e 100644 --- a/progress/helpers.py +++ b/progress/helpers.py @@ -37,9 +37,8 @@ class WriteMixin(object): def write(self, s): if self.file and self.is_tty(): - b = '\b' * self._width - c = s.ljust(self._width) - print(b + c, end='', file=self.file) + line = self.message + s.ljust(self._width) + print('\r' + line, end='', file=self.file) self._width = max(self._width, len(s)) self.file.flush()