Define the following,
bcolors
class pycolor:
BLACK = '\033[30m'
RED = '\033[31m'
GREEN = '\033[32m'
YELLOW = '\033[33m'
BLUE = '\033[34m'
PURPLE = '\033[35m'
CYAN = '\033[36m'
WHITE = '\033[37m'
END = '\033[0m'
BOLD = '\038[1m'
UNDERLINE = '\033[4m'
INVISIBLE = '\033[08m'
REVERCE = '\033[07m'
main
print pycolor.RED + "RED TEXT" + pycolor.END
And run
RED TEXT
Is output. Don't forget to add pycolor.END when you're done.
Recommended Posts