I want to use colorama, but I already use tqdm in my code.
Example:
import colorama as color
import tqdm as tqdm # without line it's working
print(color.Fore.GREEN + 'Green text')
It's working fine without tqdm, but if I import tqdm, colorama does not color the text until I restart the console. I use IPython console with Spyder (Python 3.6).
Is there a way I can use these packages together?
try it as follow (https://github.com/tqdm/tqdm/issues/450)
from tqdm import trange
from colorama import Fore
for i in trange(int(7e7),
bar_format="{l_bar}%s{bar}%s{r_bar}" % (Fore.GREEN, Fore.RESET)):
pass
import colorama as color
import tqdm as tqdm
import os
os.system('cls')
print(color.Fore.GREEN + 'Green text')
tqdm doesn't works if there is any other activity going on or was previously run on your terminal.
so its better to once clear your terminal screen at the starting of your code using os.system('cls') . This works fine for me.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With