Progress bar that can be updated concurrently.
More...
|
| | __init__ (self, int maxcount, str prefix) |
| | Create a new progress bar.
|
| |
| None | rename (self, str prefix) |
| | Change the prefix of the progress bar.
|
| |
| None | reset (self, int maxcount=None, str prefix=None) |
| | Reset the progress bar.
|
| |
| None | start (self) |
| | Enable this progress bar.
|
| |
| | progress (self) |
| | Increment the progress bar.
|
| |
| | finish (self) |
| | Disable the progress bar, setting it to 100%.
|
| |
Progress bar that can be updated concurrently.
Definition at line 10 of file progress_bar.py.
◆ __init__()
| script.progress_bar.ProgressBar.__init__ |
( |
|
self, |
|
|
int |
maxcount, |
|
|
str |
prefix |
|
) |
| |
Create a new progress bar.
Args: maxcount (int): The target counter value prefix (str): The string to prefix the bar with
Definition at line 49 of file progress_bar.py.
◆ _new_line()
| None script.progress_bar.ProgressBar._new_line |
( |
|
self, |
|
|
str |
line |
|
) |
| |
|
protected |
The TextIO line handler.
Args: line (str): line to consume
Definition at line 94 of file progress_bar.py.
◆ _print_thread()
| script.progress_bar.ProgressBar._print_thread |
( |
|
self | ) |
|
|
protected |
◆ _progress()
| script.progress_bar.ProgressBar._progress |
( |
|
self, |
|
|
|
count, |
|
|
|
total, |
|
|
|
prefix = "", |
|
|
str |
printString = "" |
|
) |
| |
|
protected |
◆ finish()
| script.progress_bar.ProgressBar.finish |
( |
|
self | ) |
|
Disable the progress bar, setting it to 100%.
Definition at line 142 of file progress_bar.py.
◆ progress()
| script.progress_bar.ProgressBar.progress |
( |
|
self | ) |
|
◆ rename()
| None script.progress_bar.ProgressBar.rename |
( |
|
self, |
|
|
str |
prefix |
|
) |
| |
Change the prefix of the progress bar.
Args: prefix (str): The string to prefix the bar with
Definition at line 70 of file progress_bar.py.
◆ reset()
| None script.progress_bar.ProgressBar.reset |
( |
|
self, |
|
|
int |
maxcount = None, |
|
|
str |
prefix = None |
|
) |
| |
Reset the progress bar.
Args: maxcount (int): New target counter value. Defaults to current maxcount. prefix (str): New string to prefix the bar with. Defaults to current prefix.
Definition at line 81 of file progress_bar.py.
◆ start()
| None script.progress_bar.ProgressBar.start |
( |
|
self | ) |
|
◆ _new_line
| script.progress_bar.ProgressBar._new_line |
|
protected |
◆ bar_len [1/2]
| int script.progress_bar.ProgressBar.bar_len = 10 |
|
static |
◆ bar_len [2/2]
| script.progress_bar.ProgressBar.bar_len |
◆ counter [1/2]
| int script.progress_bar.ProgressBar.counter = 0 |
|
static |
◆ counter [2/2]
| script.progress_bar.ProgressBar.counter |
◆ formatStr
| str script.progress_bar.ProgressBar.formatStr = "{} │{}│ {}{}\r" |
|
static |
◆ Lines
| script.progress_bar.ProgressBar.Lines = set() |
|
static |
◆ lock
| script.progress_bar.ProgressBar.lock = threading.Lock() |
|
static |
◆ maxcount [1/2]
| int script.progress_bar.ProgressBar.maxcount = 0 |
|
static |
◆ maxcount [2/2]
| script.progress_bar.ProgressBar.maxcount |
◆ prefix [1/2]
| str script.progress_bar.ProgressBar.prefix = "" |
|
static |
◆ prefix [2/2]
| script.progress_bar.ProgressBar.prefix |
◆ printer
| script.progress_bar.ProgressBar.printer |
◆ run [1/2]
| bool script.progress_bar.ProgressBar.run = True |
|
static |
◆ run [2/2]
| script.progress_bar.ProgressBar.run |
◆ stdout
| script.progress_bar.ProgressBar.stdout |
◆ wrapper
| script.progress_bar.ProgressBar.wrapper |
The documentation for this class was generated from the following file: