How do I print out in the standard output coloured lines

cniharral at gmail.com cniharral at gmail.com
Fri Feb 2 08:20:19 EST 2007


On Feb 2, 2:08 pm, Bart Van Loon <bbb... at inGen.be> wrote:
> It was 2 Feb 2007 04:27:06 -0800, when cnihar... at gmail.com wrote:
>
> > print "Hello World!!"
>
> > I want it in red colour.
>
> > That's all.
>
> Use colour escape codes:
>
> print "\033[1;31mHello World\033[0m"
>
> That's all. :-)
>
> --
> groetjes,
> BBBart
>
>    Golly, I'd hate to have a kid like me!
>                           -- Calvin


Well, this is fine. It's what I was looking for. I have done something
similar with a system command execution (echo) but it was not really
smart, but this fit my needs.

Thanks a lot.

Regards.

Carlos Niharra López




More information about the Python-list mailing list