litex_term: nicer progress bar
This commit is contained in:
parent
4f3ce6db2b
commit
460185fa8e
|
@ -154,7 +154,10 @@ class LiteXTerm:
|
||||||
length = len(data)
|
length = len(data)
|
||||||
start = time.time()
|
start = time.time()
|
||||||
while len(data):
|
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 = SFLFrame()
|
||||||
frame_data = data[:251]
|
frame_data = data[:251]
|
||||||
frame.cmd = sfl_cmd_load
|
frame.cmd = sfl_cmd_load
|
||||||
|
|
Loading…
Reference in New Issue