Progress Bar
New in version 0.4.0.
Module to make an ASCII progress bar.
-
class lsl.common.progress.ProgressBar(max=100, span=70, sym='=', printP=True)
Object to make a ASCII progress bar for use with various long-
run tasks.
- Example Usage:
>>> import sys
>>> from progess import ProgressBar
>>> pb = ProgressBar()
>>> pb.inc()
>>> sys.stdout.write(pb.show())
>>> sys.stdout.flush()
-
dec(amount=1)
- Decrement the progress bar’s internal counter by some amount. The
default is one.
-
inc(amount=1)
- Increment the progress bar’s internal counter by some amount. The
default is one.
-
show()
- Build a string representation of the progress bar and return it.