mini change

This commit is contained in:
Christoph J. Scherr 2023-04-21 00:48:47 +02:00
parent 207673382f
commit d3483e229e
Signed by: PlexSheep
GPG Key ID: 25B4ACF7D88186CC
1 changed files with 2 additions and 2 deletions

View File

@ -7,7 +7,7 @@ import time
def report_progress(filename, progress):
"""progress: 0-10"""
stdscr.addstr(0, 0, "Moving file: {0}".format(filename))
stdscr.addstr(1, 0, "Total progress: [{1:10}] {0}%".format(progress * 10, "#" * progress))
stdscr.addstr(1, 0, "Total progress: [{1:20}] {0}%".format(progress * 5, "#" * progress))
stdscr.refresh()
if __name__ == "__main__":
@ -16,7 +16,7 @@ if __name__ == "__main__":
curses.cbreak()
try:
for i in range(10):
for i in range(20):
report_progress("file_{0}.txt".format(i), i+1)
time.sleep(0.5)
finally: