mini change
This commit is contained in:
parent
207673382f
commit
d3483e229e
|
@ -7,7 +7,7 @@ import time
|
||||||
def report_progress(filename, progress):
|
def report_progress(filename, progress):
|
||||||
"""progress: 0-10"""
|
"""progress: 0-10"""
|
||||||
stdscr.addstr(0, 0, "Moving file: {0}".format(filename))
|
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()
|
stdscr.refresh()
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
|
@ -16,7 +16,7 @@ if __name__ == "__main__":
|
||||||
curses.cbreak()
|
curses.cbreak()
|
||||||
|
|
||||||
try:
|
try:
|
||||||
for i in range(10):
|
for i in range(20):
|
||||||
report_progress("file_{0}.txt".format(i), i+1)
|
report_progress("file_{0}.txt".format(i), i+1)
|
||||||
time.sleep(0.5)
|
time.sleep(0.5)
|
||||||
finally:
|
finally:
|
||||||
|
|
Loading…
Reference in New Issue