Copyright 2004 Fourthought, Inc. (USA). Detailed license and copyright information: http://4suite.org/COPYRIGHT Project home, documentation, distributions: http://4suite.org/
|
Classes:
|
Indicator style, given as constructor argument, can be
0: percentage; 1: bar; or 2: both. Default is 0.
If using styles 1 or 2, an optional width argument
for the bar portion can also be given (default 60).
Example usage:
# First emit whatever prefaces the indicator, if desired
print " status:",
sys.__stdout__.flush()
# Create a new indicator
p = ProgressIndicator(2)
p.newIndicator()
# With each iteration through a task, or as often as you want,
# call updateProgress(), passing 2 numbers: amount completed,
# and total amount to do.
limit = 300000
for i in range(limit):
p.updateProgress(i, limit)
print