From 2ec46208b38e530b3ec504b6fce56aca9ffac191 Mon Sep 17 00:00:00 2001 From: Brendan <2bndy5@gmail.com> Date: Sun, 3 Mar 2024 08:09:16 -0800 Subject: [PATCH] use single-byte chars for py example progress bars --- examples_linux/scanner.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/examples_linux/scanner.py b/examples_linux/scanner.py index 7cdacdba..4d191a79 100644 --- a/examples_linux/scanner.py +++ b/examples_linux/scanner.py @@ -45,15 +45,15 @@ def __init__( # pylint: disable=too-many-arguments,invalid-name self.x, self.y, self.width, self.win, self.color = (x, y, cols, std_scr, color) string = label # always labeled in MHz (4 digits) # -9 for padding, label, & signal count - string += "─" * (self.width - 8) # the empty bar + string += "-" * (self.width - 8) # the empty bar string += " - " # the initial signal count self.win.addstr(self.y, self.x, string, self.color) def update(self, completed: int, signal_count: int): """Update the progress bar.""" filled = min(CACHE_MAX, completed) / CACHE_MAX - bar = "═" * int((self.width - 8) * filled) - empty = "─" * (self.width - 8 - len(bar)) + bar = "=" * int((self.width - 8) * filled) + empty = "-" * (self.width - 8 - len(bar)) count = "-" if signal_count: count = "%X" % min(0xF, signal_count)