~abentley/bzrtools/bzrtools.dev

« back to all changes in this revision

Viewing changes to progress.py

  • Committer: Aaron Bentley
  • Date: 2005-05-10 16:56:32 UTC
  • Revision ID: abentley@troll-20050510165632-e710bc4127a2eb07
Made progress bars use stderr

Show diffs side-by-side

added added

removed removed

Lines of Context:
42
42
    markers = int (float(cols) * progress.current / progress.total)
43
43
    txt = fmt % (progress.current, progress.total, progress.units,
44
44
                 progress.percent)
45
 
    sys.stdout.write("\r[%s%s]%s" % ('='*markers, ' '*(cols-markers), txt))
 
45
    sys.stderr.write("\r[%s%s]%s" % ('='*markers, ' '*(cols-markers), txt))
46
46
 
47
47
def clear_progress_bar():
48
 
    sys.stdout.write('\r%s\r' % (' '*79))
 
48
    sys.stderr.write('\r%s\r' % (' '*79))
49
49