~abentley/bzrtools/bzrtools.dev

« back to all changes in this revision

Viewing changes to progress.py

  • Committer: Aaron Bentley
  • Date: 2011-06-27 23:07:10 UTC
  • Revision ID: aaron@aaronbentley.com-20110627230710-orth0tzf1kwknfen
Better handling of compound tar names.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
# Copyright (C) 2005 Aaron Bentley
2
 
# <aaron.bentley@utoronto.ca>
 
2
# <aaron@aaronbentley.com>
3
3
#
4
4
#    This program is free software; you can redistribute it and/or modify
5
5
#    it under the terms of the GNU General Public License as published by
37
37
            return "%i of %i %s %.1f%%" % (self.current, self.total, self.units,
38
38
                                         self.percent)
39
39
        else:
40
 
            return "%i %s" (self.current, self.units) 
 
40
            return "%i %s" (self.current, self.units)
41
41
 
42
42
def show_progress(pi, prog):
43
43
    pi.update(prog.units, prog.current, prog.total)
44
 
        
 
44
 
45
45
def clear_progress_bar():
46
46
    sys.stderr.write('\r%s\r' % (' '*79))