ats_utilities.splasher.progress_bar module¶
- Module
progress_bar.py
- Copyright
Copyright (C) 2017 - 2026 Vladimir Roncevic <elektron.ronca@gmail.com> ats_utilities is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. ats_utilities is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>.
- Info
Defines class ProgressBar with attribute(s) and method(s). Implements a progressbar as part of splash screen.
- class ats_utilities.splasher.progress_bar.ProgressBar(end: int, start: int = 0)[source]¶
Bases:
IProgressBarDefines class ProgressBar with attribute(s) and method(s). Implements a progressbar as part of splash screen.
It defines:
- attributes:
- DEFAULT_BAR_LENGTH - Length of progressbar.DEFAULT_CHAR_ON - Loaded progress element.DEFAULT_CHAR_OFF - Unloaded progress element._start - Start of level._end - End of level._bar_length - Progress length._level - Progress level._plotted - Plotted progress._level_chars - Level progress chars.
- methods:
- __init__ - Initials ProgressBar constructor.set_level - Sets level for progress bar.plot_progress - Plots progress bar.set_and_plot - Sets and plots progress bar.__del__ - Dunder del method for progress bar.__str__ - Returns the string representation of ProgressBar.
- DEFAULT_BAR_LENGTH: int = 60¶
- DEFAULT_CHAR_OFF: str = ' '¶
- DEFAULT_CHAR_ON: str = '█'¶
- _abc_impl = <_abc._abc_data object>¶
- plot_progress(columns: int) None[source]¶
Plots progress bar.
- Parameters:
columns (<int>) – Columns for open console session.
- Exceptions:
None.