Coloring print lines

U. N. Owen electricity at uymail.com
Mon Aug 25 10:41:09 EDT 2003


You can use Ansi escape sequences, look at
http://www.termsys.demon.co.uk/vtansi.htm
(color attributes at the bottom of the page)

and the manuals at
http://vt100.net/

You can try "vt100 ansi escape sequences" with
google, too...

Please note that this should work on any Linux
or Unix (including MacOS X), or in MS-DOS if you
have ansi.sys installed in config.sys.
I don't know if it will work in Windows.
And sometimes it depends on the function used
to print on screen (I remember that under DOS
not both printf and cprintf worked in C). I just
tried with

print "\033[35m"

under linux/debian, and it seems ok.

'hope it helps...
-- 
_______________________________________________
Get your free email from http://www.uymail.com

Powered by Outblaze





More information about the Python-list mailing list