Skip to content

Instantly share code, notes, and snippets.

@timothymugayi
Created December 6, 2019 15:33
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save timothymugayi/59383b214964b6c0c69c8de1ec395fc6 to your computer and use it in GitHub Desktop.
Save timothymugayi/59383b214964b6c0c69c8de1ec395fc6 to your computer and use it in GitHub Desktop.
Tqdm colors with colorama Cross-platform colored terminal text
from tqdm import trange
from colorama import Fore
# Cross-platform colored terminal text.
color_bars = [Fore.BLACK,
Fore.RED,
Fore.GREEN,
Fore.YELLOW,
Fore.BLUE,
Fore.MAGENTA,
Fore.CYAN,
Fore.WHITE]
for color in color_bars:
for i in trange(int(7e7),
bar_format="{l_bar}%s{bar}%s{r_bar}" % (color, Fore.RESET)):
pass
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment