One Line Progress Meter
OneLineProgressMeter documentation
Add a progress meter to your application by adding 1 line of code.
one_line_progress_meter
one_line_progress_meter(
title,
current_value,
max_value,
args = *<1 or N objects>,
key = "OK for 1 meter",
orientation = "v",
bar_color = (None, None),
button_color = None,
size = (20, 20),
border_width = None,
grab_anywhere = False,
no_titlebar = False,
keep_on_top = None,
no_button = False
)
Parameter Descriptions
Name | Type | Default | Description |
---|---|---|---|
*args | Any | stuff to output as text in the window along with the meter | |
bar_color | (str, str) or str | (None, None) | The 2 colors that make up a progress bar. Either a tuple of 2 strings or a string. Tuple - (bar, background). A string with 1 color changes the background of the bar only. A string with 2 colors separated by "on" like "red on blue" specifies a red bar on a blue background. |
border_width | int | None | width of border around element |
button_color | (str, str) or str | None | button color (foreground, background) |
current_value | int | current value | |
grab_anywhere | bool | False | If True: can grab anywhere to move the window (Default = False) |
keep_on_top | bool | None | If True the window will remain above all current windows |
key | str or int or tuple or object | OK for 1 meter | Used to differentiate between multiple meters. Used to cancel meter early. Now optional as there is a default value for single meters |
max_value | int | max value of progress meter | |
no_button | bool | False | If True: window will be created without a cancel button |
no_titlebar | bool | False | If True: no titlebar will be shown on the window |
orientation | str | v | 'horizontal' or 'vertical' ('h' or 'v' work) (Default value = 'vertical' / 'v') |
size | (int, int) | (20, 20) | (w,h) w=characters-wide, h=rows-high (Default value = DEFAULT_PROGRESS_BAR_SIZE) |
title | str | text to display in titlebar of window | |
RETURN | bool | True if updated successfully. False if user closed the meter with the X or Cancel button |
one_line_progress_meter_cancel
Cancels and closes a previously created One Line Progress Meter window
Parameter Descriptions
Name | Type | Default | Description |
---|---|---|---|
key | Any | OK for 1 meter | Key used when meter was created |
RETURN | None | None |