Module progressBar :: Class ProgressBar
[hide private]
[frames] | no frames]

Class ProgressBar

source code

object --+
         |
        ProgressBar

A progress bar display class

Instance Methods [hide private]
 
__init__(self, termWidth=None, barWidth=None, maxVal=None, ttyOnly=False, fd=sys.stderr)
Ctor that figures out the range of the progress bar.
source code
 
update(self, i)
Update progress bar.
source code
 
fini(self)
Finish progress bar output.
source code

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, termWidth=None, barWidth=None, maxVal=None, ttyOnly=False, fd=sys.stderr)
(Constructor)

source code 

Ctor that figures out the range of the progress bar.

Parameters:
  • termWidth - The terminal width
  • barWidth - The number of character that make up the bar
  • maxVal - The maximum value (required)
  • ttyOnly - If true then only print progress bar element if connected to a terminal.
  • fd - The output stream.
Overrides: object.__init__

update(self, i)

source code 

Update progress bar.

Parameters:
  • i - input value