aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJauhien Piatlicki (jauhien) <piatlicki@gmail.com>2013-09-04 16:42:09 +0200
committerJauhien Piatlicki (jauhien) <piatlicki@gmail.com>2013-09-04 16:42:09 +0200
commitd91b5eafae9a41730c9ad978f46871a32e3e1e15 (patch)
tree4eb4ad330c1d5261d2244beea5e8785cd6ad962e /g_sorcery
parentgs_db_tool/gs_db_tool: for_all added (diff)
downloadg-sorcery-d91b5eafae9a41730c9ad978f46871a32e3e1e15.tar.gz
g-sorcery-d91b5eafae9a41730c9ad978f46871a32e3e1e15.tar.bz2
g-sorcery-d91b5eafae9a41730c9ad978f46871a32e3e1e15.zip
g_sorcery/logger: progress bar to stderr
Diffstat (limited to 'g_sorcery')
-rw-r--r--g_sorcery/logger.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/g_sorcery/logger.py b/g_sorcery/logger.py
index 5848715..6617602 100644
--- a/g_sorcery/logger.py
+++ b/g_sorcery/logger.py
@@ -58,9 +58,9 @@ class ProgressBar(object):
percent = (self.processed * 100)//self.total
progress = (percent * self.length)//100
blank = self.length - progress
- sys.stdout.write("\r %s [%s%s] %s%%" % \
+ sys.stderr.write("\r %s [%s%s] %s%%" % \
(show, "#" * progress, " " * blank, percent))
- sys.stdout.flush()
+ sys.stderr.flush()
def increment(self, count = 1):
self.processed += count