Search
 
SCRIPT & CODE EXAMPLE
 

PYTHON

python color in console

class bcolors:
    HEADER = '33[95m'
    OKBLUE = '33[94m'
    OKGREEN = '33[92m'
    WARNING = '33[93m'
    FAIL = '33[91m'
    ENDC = '33[0m'
    BOLD = '33[1m'
    UNDERLINE = '33[4m'

print(f"{bcolors.WARNING}Error : Test message !{bcolors.ENDC}")
Comment

python color text console

class bcolors:
    HEADER = '33[95m'
    OKBLUE = '33[94m'
    OKCYAN = '33[96m'
    OKGREEN = '33[92m'
    WARNING = '33[93m'
    FAIL = '33[91m'
    ENDC = '33[0m'
    BOLD = '33[1m'
    UNDERLINE = '33[4m'
    
print(f"{bcolors.WARNING}Warning: Example. Continue?{bcolors.ENDC}")
Comment

how to change the console background color in python

import os

os.system('color 8f')
Comment

python colored text in console

print(f"{bcolors.WARNING}Warning: No active frommets remain. Continue?{bcolors.ENDC}")
Comment

PREVIOUS NEXT
Code Example
Python :: no module named torch 
Python :: argparse boolean default 
Python :: plot nan values sns 
Python :: search code ascii python 
Python :: installing django 
Python :: df sort values 
Python :: shuffle dataframe python 
Python :: django create empty migration 
Python :: xlim python 
Python :: display np array as image 
Python :: pygame draw circle 
Python :: plt tight layout 
Python :: FutureWarning: Input image dtype is bool. Interpolation is not defined with bool data type. Please set order to 0 or explicitly cast input image to another data type. Starting from version 0.19 a ValueError will be raised instead of this warning. 
Python :: python install pandas for linux 
Python :: django user form 
Python :: argparse 
Python :: python discord bot join voice channel 
Python :: open image in numpy 
Python :: inspectdb django 
Python :: return result from exec python 
Python :: how to download file from python 
Python :: python cv2 screen capture 
Python :: set cuda visible devices python 
Python :: Exception: ROM is missing for space_invaders, see https://github.com/openai/atari-py#roms for instructions site:stackoverflow.com 
Python :: pretty print list python 
Python :: python find index of highest value in list 
Python :: python levenshtein distance 
Python :: how to sort a list by the second element in tuple python 
Python :: python copy file and rename 
Python :: python heart code 
ADD CONTENT
Topic
Content
Source link
Name
5+2 =