pymor.playground package

Submodules

progressbar module


class pymor.playground.progressbar.ProgressBar(minValue=0, maxValue=100, totalWidth=79)[source]

Bases: object

Creates a text-based progress bar. Call the object with the print command to see the progress bar, which looks something like this:

[=======>        22%                  ]

You may specify the progress bar’s width, min and max values on init.

Methods

ProgressBar maximum, setMaximum, update_amount, __call__
__call__(value)[source]

Increases the amount by value, and writes to stdout. Prints a carriage return first, so it will overwrite the current line in stdout.

update_amount(newAmount=0)[source]

Update the progress bar with the new amount (with min and max values set at initialization; if it is over or under, it takes the min or max value as a default.