“Colorama” Réponses codées

Colorama

from colorama import Fore, Back, Style
print(Fore.RED + 'some red text')
print(Back.GREEN + 'and with a green background')
print(Style.DIM + 'and in dim text')
print(Style.RESET_ALL)
print('back to normal now')
Xanthous Xenomorph

Colorama

from colorama import Fore, Back, Style , init

init() # crucial on windows but on other platforms it has no effect

print(Fore.RED + 'some red text')
print(Back.GREEN + 'and with a green background')
print(Style.DIM + 'and in dim text')
print(Style.RESET_ALL)
print('back to normal now')
lieutenant-uni

Réponses similaires à “Colorama”

Parcourir les réponses de code populaires par langue

Parcourir d'autres langages de code