Priting Out in COLOURS
Donn Cave
donn at u.washington.edu
Wed Jun 9 17:29:44 EDT 2004
In article <mailman.764.1086804567.6949.python-list at python.org>,
"Satish Chimakurthi" <skchim0 at engr.uky.edu> wrote:
> This must be a simple thing to do, but am not sure about it. I like to know
> how I can print my statements out, in colour.
>
> Example: print 'PYTHON IS VERSATILE'
>
> By default, this statement prints out in BLACK. What if I need to change it's
> colour ??
Well, you can make it as complicated as you want, but
the basic color sequence for ANSI terminals is like
'\033[NNm', where NN is 30..37 Use '\033[m' to return
to normal color.
Donn Cave, donn at u.washington.edu
More information about the Python-list
mailing list