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
Log message with 'debug' level. |
|
Return a progress indicator. |
|
Return an object to show a progress indicator during (un)pickling. |
|
Log message with 'info' level. |
|
Get/set the current progress indication level. |
|
Log message with given level. |
|
Get a wrapper that invokes a progress indicator on some routines. |
|
A simplified version of |
|
Log message with 'verbose' level. |
Classes
A "null" progress indicator. |
|
A progress indicator. |
|
Indicates objects returned by |
|
Stack of currently active progress indicators. |
|
Picklable proxy to a progress indicator. |
|
Remove the progress indicators created by |
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.