holoviews.ipython.widgets module#

class holoviews.ipython.widgets.ProgressBar(*, blank_char, display, elapsed_time, fill_char, width, label, percent_range, name)[source]#

Bases: ProgressIndicator

A simple text progress bar suitable for both the IPython notebook and the IPython interactive prompt.

ProgressBars are automatically nested if a previous instantiated progress bars has not achieved 100% completion.

Parameter Definitions


Parameters inherited from:

display = Selector(default='stdout', label='Display', names={}, objects=['stdout', 'disabled', 'broadcast'])

Parameter to control display of the progress bar. By default, progress is shown on stdout but this may be disabled e.g. for jobs that log standard output to file. If the output mode is set to ‘broadcast’, a socket is opened on a stated port to broadcast the completion percentage. The RemoteProgress class may then be used to view the progress from a different process.

width = Integer(default=70, inclusive_bounds=(True, True), label='Width')

The width of the progress bar as the number of characters

fill_char = String(default='#', label='Fill char')

The character used to fill the progress bar.

blank_char = String(default=' ', label='Blank char')

The character for the blank portion of the progress bar.

elapsed_time = Boolean(default=True, label='Elapsed time')

If enabled, the progress bar will disappear and display the total elapsed time once 100% completion is reached.

class holoviews.ipython.widgets.RemoteProgress(port, **params)[source]#

Bases: ProgressBar

Connect to a progress bar in a separate process with output_mode set to ‘broadcast’ in order to display the results (to stdout).

Parameter Definitions


Parameters inherited from:

holoviews.core.util.ProgressIndicator: percent_range, label

holoviews.ipython.widgets.ProgressBar: display, width, fill_char, blank_char, elapsed_time

hostname = String(default='localhost', label='Hostname')

Hostname where progress is being broadcast.

port = Integer(default=8080, inclusive_bounds=(True, True), label='Port')

Target port on hostname.

class holoviews.ipython.widgets.RunProgress(*, interval, run_hook, blank_char, display, elapsed_time, fill_char, width, label, percent_range, name)[source]#

Bases: ProgressBar

RunProgress breaks up the execution of a slow running command so that the level of completion can be displayed during execution.

This class is designed to run commands that take a single numeric argument that acts additively. Namely, it is expected that a slow running command ‘run_hook(X+Y)’ can be arbitrarily broken up into multiple, faster executing calls ‘run_hook(X)’ and ‘run_hook(Y)’ without affecting the overall result.

For instance, this is suitable for simulations where the numeric argument is the simulated time - typically, advancing 10 simulated seconds takes about twice as long as advancing by 5 seconds.

Parameter Definitions


Parameters inherited from:

holoviews.core.util.ProgressIndicator: percent_range, label

holoviews.ipython.widgets.ProgressBar: display, width, fill_char, blank_char, elapsed_time

interval = Number(default=100, inclusive_bounds=(True, True), label='Interval')

The run interval used to break up updates to the progress bar.

run_hook = Callable(label='Run hook')

By default updates time in param which is very fast and does not need a progress bar. Should be set to some slower running callable where display of progress level is desired.

holoviews.ipython.widgets.progress(iterator, enum=False, length=None)[source]#

A helper utility to display a progress bar when iterating over a collection of a fixed length or a generator (with a declared length).

If enum=True, then equivalent to enumerate with a progress bar.