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.

class lsl.common.progress.ProgressBarPlus(max=100, span=70, sym='=', printP=True)

Extended version of the ProgressBar class that has a crude time estimator.

Example Usage:
>>> import sys
>>> from progess import ProgressBar
>>> pb = ProgressBar()
>>> pb.inc()
>>> sys.stdout.write(pb.show())
>>> sys.stdout.flush()

Note

The timing feature is only active when the inc()/dec() functions are called.

New in version 0.6.4.

show()

Build a string representation of the progress bar and return it.

startTimer()

Initialize the timer.

Previous topic

Color Support

Next topic

Defining Single Station Observations and Observation Metadata

This Page