diff --git a/alive_progress/animations/bars.py b/alive_progress/animations/bars.py index d99d6ee..7939bb2 100644 --- a/alive_progress/animations/bars.py +++ b/alive_progress/animations/bars.py @@ -28,7 +28,7 @@ def draw_bar(percent, end=False): return draw_bar.left_border + bar + (draw_bar.right_border if right else '') virtual_length = length * len(chars) - padding = background * math.ceil((length - len(tip)) / len(background)) + padding = background * int(math.ceil((length - len(tip)) / len(background))) blanks = ' ' * (length - len(tip)) draw_bar.left_border, draw_bar.right_border = borders diff --git a/alive_progress/styles/internal.py b/alive_progress/styles/internal.py index 8787c29..7b1381e 100644 --- a/alive_progress/styles/internal.py +++ b/alive_progress/styles/internal.py @@ -108,10 +108,11 @@ def __create_bars(): solid = standard_bar_factory(chars='■', borders='<>', tip='►', errors='⚠✗') checks = standard_bar_factory(chars='✓', tip='', errors='⚠✗') filling = standard_bar_factory(chars='▁▂▃▄▅▆▇█', tip=None, errors='⚠✗') + pacman = standard_bar_factory(chars='Cc-', background=" o", borders="[]", tip=None, errors='⚠✗') result = {k: v for k, v in locals().items() if not k.startswith('_')} desired_order = 'classic classic2 smooth blocks bubbles circles hollow squares solid checks ' \ - 'filling'.split() + 'filling pacman'.split() return _wrap_ordered(result, desired_order) diff --git a/demo.py b/demo.py new file mode 100644 index 0000000..95e1be5 --- /dev/null +++ b/demo.py @@ -0,0 +1,4 @@ +from alive_progress import alive_bar, showtime, show_bars + +# it's showtime baby! +show_bars()