pyreporting.progress.ProgressStack#
- class ProgressStack[source]#
Bases:
object
Used for handling a nested progress bar
ProgressStack holds a stack of nested progress bar statuses, so that for example, if an operation is performed 4 times, the progress bar will not go from 0% to 100% 4 times, but instead go from 0% to 25% for the first operation, etc.
Methods
Increment the current progress value by one step
Return the label that should be displayed
Return the title that should be displayed
Return the global value that should be displayed
Return True if the is no progress currently reported
Remove the last nested progress bar from the stack
Nest progress reporting.
Remove all nested progress bars
Update the values of the current progress bar
- class ProgressStackItem(bar_min=0, bar_step=100, label='Please wait', title='', value=None, step=None)[source]#
Bases:
object
Stores status for one of a stack of nested progress bars
- child_bar_min()[source]#
When creating a nested child progress bar, return the global minimum bar position for this child progress bar
- Return type:
- child_bar_step()[source]#
When creating a nested child progress bar, return the global bar width for this child progress bar
- Return type:
- child_value()[source]#
Return the initial value that a nested child progress bar should take. This is normally zero, but if no parent value was specified it could be None to allow for an unspecified progress value
- Return type:
- push()[source]#
Nest progress reporting. After calling this function, subsequent progress updates will modify the progress bar between the current value and the current value plus the last step
- update(value, step, label, title)[source]#
Update the values of the current progress bar
- Parameters:
value – The progress percentage, or None to display a non-ending progress bar, if supported
step – Percentage difference between progress calls.
label – The label text to display by the progress
title – The title of the progress dialog