Skip to content

Commit 67a8889

Browse files
committed
Add new widgets to README and examples.
1 parent 0dca2aa commit 67a8889

2 files changed

Lines changed: 13 additions & 0 deletions

File tree

README.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,9 @@ of widgets:
5858
- `FileTransferSpeed <http://progressbar-2.readthedocs.io/en/latest/_modules/progressbar/widgets.html#FileTransferSpeed>`_
5959
- `FormatCustomText <http://progressbar-2.readthedocs.io/en/latest/_modules/progressbar/widgets.html#FormatCustomText>`_
6060
- `FormatLabel <http://progressbar-2.readthedocs.io/en/latest/_modules/progressbar/widgets.html#FormatLabel>`_
61+
- `FormatLabelBar <http://progressbar-2.readthedocs.io/en/latest/_modules/progressbar/widgets.html#FormatLabel>`_
6162
- `Percentage <http://progressbar-2.readthedocs.io/en/latest/_modules/progressbar/widgets.html#Percentage>`_
63+
- `PercentageLabelBar <http://progressbar-2.readthedocs.io/en/latest/_modules/progressbar/widgets.html#PercentageLabelBar>`_
6264
- `ReverseBar <http://progressbar-2.readthedocs.io/en/latest/_modules/progressbar/widgets.html#ReverseBar>`_
6365
- `RotatingMarker <http://progressbar-2.readthedocs.io/en/latest/_modules/progressbar/widgets.html#RotatingMarker>`_
6466
- `SimpleProgress <http://progressbar-2.readthedocs.io/en/latest/_modules/progressbar/widgets.html#SimpleProgress>`_

examples.py

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -177,6 +177,17 @@ def multi_progress_bar_example(left=True):
177177
time.sleep(0.02)
178178

179179

180+
@example
181+
def percentage_label_bar_example():
182+
widgets = [progressbar.PercentageLabelBar()]
183+
bar = progressbar.ProgressBar(widgets=widgets, max_value=10).start()
184+
for i in range(10):
185+
# do something
186+
time.sleep(0.1)
187+
bar.update(i + 1)
188+
bar.finish()
189+
190+
180191
@example
181192
def file_transfer_example():
182193
widgets = [

0 commit comments

Comments
 (0)