From 6804df4b7333dced152e7b0de887dc4f18c3691f Mon Sep 17 00:00:00 2001 From: Thomas Vander Stichele Date: Sat, 11 Apr 2009 21:57:25 +0000 Subject: [PATCH] * morituri/common/task.py: clear with whitespace. --- ChangeLog | 5 +++++ morituri/common/task.py | 5 +++++ 2 files changed, 10 insertions(+) diff --git a/ChangeLog b/ChangeLog index 51a2820..0cbaa6e 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2009-04-11 Thomas Vander Stichele + + * morituri/common/task.py: + clear with whitespace. + 2009-04-11 Thomas Vander Stichele * examples/ARcue.py: diff --git a/morituri/common/task.py b/morituri/common/task.py index 62d9cb9..b5b5ec6 100644 --- a/morituri/common/task.py +++ b/morituri/common/task.py @@ -138,6 +138,11 @@ class SyncRunner(TaskRunner): if self._skip: sys.stdout.write('%s %3d %%\n' % ( self._task.description, 100.0)) + else: + # clear with whitespace + text = '%s %3d %%' % ( + self._task.description, 100.0) + sys.stdout.write("%s\r" % (' ' * len(text), )) def stopped(self, task): self._loop.quit()