Created
December 6, 2019 15:33
-
-
Save timothymugayi/59383b214964b6c0c69c8de1ec395fc6 to your computer and use it in GitHub Desktop.
Tqdm colors with colorama Cross-platform colored terminal text
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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