Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def progressBar(value, endvalue, bar_length=41):
- percent = float(value) / endvalue
- arrow = '-' * int(round(percent * bar_length)-1) + '>'
- spaces = ' ' * (bar_length - len(arrow))
- sys.stdout.write("\rPercent: [{0}] {1}%".format(arrow + spaces, int(round(percent * 100))))
- sys.stdout.flush()
Add Comment
Please, Sign In to add comment