On Thu, 30 Jul 2009 23:40:37 +0100, Robert Dailey <rcdai...@gmail.com> wrote:

Anyone know of a way to print text in Python 3.1 with colors in a
portable way? In other words, I should be able to do something like
this:

print_color( "This is my text", COLOR_BLUE )

And this should be portable (i.e. it should work on Linux, Mac,
Windows).

...in an xterm, over a telnet connection, via VNC...

There's no portable way of doing this in any language, since it's
up to the terminal emulator exactly what it does with what incoming
bytes.  Some respect the ANSI colour codes, some don't; that's about
all that you can say.

--
Rhodri James *-* Wildebeest Herder to the Masses
--
http://mail.python.org/mailman/listinfo/python-list

Reply via email to