From 460185fa8ec0fd3cd4ae63d1fe1d17341d4e827a Mon Sep 17 00:00:00 2001 From: whitequark Date: Thu, 10 Nov 2016 20:15:56 +0100 Subject: [PATCH] litex_term: nicer progress bar --- litex/soc/tools/litex_term.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/litex/soc/tools/litex_term.py b/litex/soc/tools/litex_term.py index 97fb0579..53da5368 100644 --- a/litex/soc/tools/litex_term.py +++ b/litex/soc/tools/litex_term.py @@ -154,7 +154,10 @@ class LiteXTerm: length = len(data) start = time.time() while len(data): - print("{}%\r".format(100*position//length), end="") + sys.stdout.write("|{}>{}| {}%\r".format('=' * (20*position//length), + ' ' * (20-20*position//length), + 100*position//length)) + sys.stdout.flush() frame = SFLFrame() frame_data = data[:251] frame.cmd = sfl_cmd_load -- 2.30.2