Answer the question
In order to leave comments, you need to log in
Python 2.4 colorize console without 3rd party modules?
There is a very old server on Solaris. Python 2.4. There is no Internet access. I can't install any modules.
How can I highlight certain text with color? It means from Python to print some text on the screen in different colors.
Answer the question
In order to leave comments, you need to log in
here are the color codes:
Black 0;30 Dark Gray 1;30
Blue 0;34 Light Blue 1;34
Green 0;32 Light Green 1;32
Cyan 0;36 Light Cyan 1;36
Red 0;31 Light Red 1;31
Purple 0;35 Light Purple 1;35
Brown/Orange 0;33 Yellow 1;33
Light Gray 0;37 White 1;37
print '\033[0;31mHello Red!'
print '\033[0;32mHello Green!'
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question