3.11. sciexp2.common.progress

Source: sciexp2/common/progress.py

Progress indicators.

Progress messages are only shown if the provided level is greater than the one in level.

The available levels are: LVL_NONE, LVL_PROGRESS (the default), LVL_INFO, LVL_VERBOSE and LVL_DEBUG.

Functions

debug

Log message with 'debug' level.

get

Return a progress indicator.

get_pickle

Return an object to show a progress indicator during (un)pickling.

get_writer

info

Log message with 'info' level.

level

Get/set the current progress indication level.

log

Log message with given level.

progressable

Get a wrapper that invokes a progress indicator on some routines.

progressable_simple

A simplified version of progressable.

verbose

Log message with 'verbose' level.

Classes

Null

A "null" progress indicator.

Progress

A progress indicator.

Progressable

Indicates objects returned by progressable.

Stack

Stack of currently active progress indicators.

UnpicklerStart

Picklable proxy to a progress indicator.

UnpicklerStop

Remove the progress indicators created by UnpicklerStart.

3.11.7. debug

debug(fmt, *args, **kwargs)

Log message with ‘debug’ level.

3.11.8. get

get(obj, msg='')

Return a progress indicator.

3.11.9. get_pickle

get_pickle(obj, **kwargs)

Return an object to show a progress indicator during (un)pickling.

The progress indicator can be reached through Stack.CURRENT.

Parameters:
obj

Object to show the progress indicator for

kwargs

Additional arguments for UnpicklerStart.

3.11.10. get_writer

get_writer(file)

3.11.11. info

info(fmt, *args, **kwargs)

Log message with ‘info’ level.

3.11.12. level

level(level_=None)

Get/set the current progress indication level.

3.11.13. log

log(level_, fmt, *args, **kwargs)

Log message with given level.

3.11.14. progressable

progressable(other, progr, funcs=None, iters=None)

Get a wrapper that invokes a progress indicator on some routines.

Parameters:
other

Object to wrap.

progr

A progress indicator instance.

funcslist of str, optional

List of routines in other to wrap.

iterslist of str, optional

List of routines in other that return an interator to wrap.

Notes

Argument other is also passed as the first argument to get, such that it can return a proper indicator.

3.11.15. progressable_simple

progressable_simple(contents, length, *args, **kwargs)

A simplified version of progressable.

Creates a progress indicator from the given arguments.

3.11.16. verbose

verbose(fmt, *args, **kwargs)

Log message with ‘verbose’ level.