taucmdr.progress module
Draw progress indicators on the console.
Show bars or spinners, possibly with instantaneous CPU load average.
-
class
taucmdr.progress.ProgressIndicator(label, total_size=0, block_size=1, show_cpu=True, auto_refresh=0.25)[source]
Bases: object
A fancy progress indicator to entertain antsy users.
-
complete()[source]
-
increment(count=1)[source]
-
phase(label)[source]
-
pop_phase()[source]
-
push_phase(label, implicit=False)[source]
-
update(count=None, block_size=None, total_size=None)[source]
Show progress.
Updates block_size or total_size if given for compatibility with urllib.urlretrieve.
| Parameters: |
- count (int) – Number of blocks of block_size that have been completed.
- block_size (int) – Size of a work block.
- total_size (int) – Total amount of work to be completed.
|
-
taucmdr.progress.load_average()[source]
Calculate the CPU load average.
| Returns: |
- Load average since last time this routine was called
- or None if couldn’t calculate load average.
|
| Return type: | float |