• API
• FAQ
• Tools
• Archive
SHARE
TWEET

# Untitled

a guest Jun 19th, 2019 54 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
1. def progress_bar(p_value, p_max: int):
2.     """
3.     :70 = Γ o tamanho da barra
4.     :param p_value: Valor que estΓ‘ sendo iterado de um laΓ§o de repetiΓ§Γ£o
5.     :param p_max: Γ a quantidade total do dados que estΓ‘ sendo iterado
6.     :return:
7.     """
8.     chars = int(p_value * 40 / float(p_max))
9.     percent = int((p_value / float(p_max)) * 100)
10.     sys.stdout.write("  ") + sys.stdout.write("#" * chars)
11.     sys.stdout.write(" " * (40 - chars + 2))
12.     if p_value >= p_max:
13.         sys.stdout.write("done. nn")
14.     else:
15.         sys.stdout.write("[%3i%%]r" % percent)
16.         sys.stdout.flush()
17.
18. print(" ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ")
19. for i, item in enumerate(p_list):
20.     progress_bar(i + 1, len(p_list))
21.     print(" β " + item.ljust(75) + "β")
22. print(" ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ")
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy.
Not a member of Pastebin yet?
Sign Up, it unlocks many cool features!

Top