pypath.share.progress.Progress§

class pypath.share.progress.Progress(total=None, name='Progress', interval=None, percent=True, status='initializing', done=0, init=True, unit='it', off=None, iterable=None)[source]§

Bases: object

Before I had my custom progressbar here. Now it is a wrapper around the great progressbar tqdm. Old implementation moved to OldProgress class.

__init__(total=None, name='Progress', interval=None, percent=True, status='initializing', done=0, init=True, unit='it', off=None, iterable=None)[source]§

Methods

__init__([total, name, interval, percent, ...])

get_desc()

Returns a formatted string of the description, consisted of the name and the status.

init_tqdm()

Creates a tqdm instance.

reload()

set_done(done)

Sets the position of the progress bar.

set_status(status)

Changes the prefix of the progressbar.

set_total(total)

Changes the total value of the progress bar.

step([step, msg, status, force])

Updates the progressbar by the desired number of steps.

terminate([status])

Terminates the progressbar and destroys the tqdm object.

get_desc()[source]§

Returns a formatted string of the description, consisted of the name and the status. The name supposed something constant within the life of the progressbar, while the status is there to give information about the current stage of the task.

init_tqdm()[source]§

Creates a tqdm instance.

set_done(done)[source]§

Sets the position of the progress bar.

set_status(status)[source]§

Changes the prefix of the progressbar.

set_total(total)[source]§

Changes the total value of the progress bar.

step(step=1, msg=None, status='busy', force=False)[source]§

Updates the progressbar by the desired number of steps.

Parameters:

step (int) – Number of steps or items.

terminate(status='finished')[source]§

Terminates the progressbar and destroys the tqdm object.