Search
 
SCRIPT & CODE EXAMPLE
 

PYTHON

how to use colorama

# Colorama is a module to color the python outputs
# 1. You have to install python with pip
# 2. go to your commandline and type:
#	linux: sudo pip install colorama
#	windows + mac: pip install colorama
# 3. wait for the download and then create a new python file
# 4. use the module colorama
import colorama
from colorama import Fore, Back, Style
# 5. the best way is to use colorama with f-strings
colorama.init(autoreset=True)#auto resets your settings after every output

print(f"{Fore.GREEN}green is one of the colors, there are many other colors!")
Comment

PREVIOUS NEXT
Code Example
Python :: ERROR: Failed building wheel for python-ldap 
Python :: django.core.exceptions.FieldError: Unknown field(s) (author) specified for Comment 
Python :: migrate using other database django 
Python :: flask clear session 
Python :: create django user command line 
Python :: python reduce function to sum array 
Python :: random number pythn 
Python :: torch save 
Python :: convert period to timestamp pandas 
Python :: convert series to datetime 
Python :: python math cube root 
Python :: pyqt5 math 
Python :: python create 2d array deep copy 
Python :: capitalize first letter in python 
Python :: reset index with pandas 
Python :: pyhton turtle kill 
Python :: random choice without replacement python 
Python :: chi square test in python 
Python :: python check list contains another list 
Python :: python if not path exist make path 
Python :: pygame keys pressed 
Python :: colab kaggle dataset 
Python :: export csv from dataframe python 
Python :: django wait for database 
Python :: print a random word from list python 
Python :: store all files name in a folder python 
Python :: discord embed colors python 
Python :: python multi line print 
Python :: how to log ip addresses in flask 
Python :: python set symmetric difference 
ADD CONTENT
Topic
Content
Source link
Name
6+6 =