pymor.playground package


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.


ProgressBar maximum, setMaximum, update_amount, __call__

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


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.