projects
/
litex.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
4f3ce6d
)
litex_term: nicer progress bar
author
whitequark
<whitequark@whitequark.org>
Thu, 10 Nov 2016 19:15:56 +0000
(20:15 +0100)
committer
Florent Kermarrec
<florent@enjoy-digital.fr>
Wed, 30 Nov 2016 14:36:13 +0000
(15:36 +0100)
litex/soc/tools/litex_term.py
patch
|
blob
|
history
diff --git
a/litex/soc/tools/litex_term.py
b/litex/soc/tools/litex_term.py
index 97fb0579a863380f7fe8b4adad4e0e6f9abc274b..53da5368beeacf1cfac7867045fb64fc1e2d9e40 100644
(file)
--- 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