Colored text in Linux

Tim Lavoie tim.lavoie at mts.net
Thu Sep 21 14:50:36 EDT 2000


In article <8qdg1e$248 at news.or.intel.com>, Brian Geddes wrote:
>All -
>
>I want to be able to print out colored text to the screen from inside a
>Python script in Linux.  I figure this is just a matter of using the proper
>escape codes, but I'm not sure where to find them or if I'll have to use
>anything other than the basic print() function.  Thanks in advance...

Well, you'll probably want to use curses (or ncurses), so that it isn't
console-specific. It's been a while since I've programmed for it (in C), but
essentially you can get a text interface which is portable across terminal
types. That way, it should behave within the console, xterm, or whatever. If
there is Python support for it, it would be some sort of curses module, so
look for that.

-- 
Today is a good day for information-gathering.  Read someone else's mail file.



More information about the Python-list mailing list