[Tutor] linux terminal coloring in python

Tiago Saboga tiagosaboga at terra.com.br
Sun Sep 30 00:11:35 CEST 2007


On Sat, Sep 29, 2007 at 08:32:37AM -0700, Robert Jackson wrote:

> I'm trying to get some pretty colored output for a Linux console /
terminal window.  Google searches only reveal the curses module to
colorize output.

> Is there a simpler way?  Curses seems to be FAR too powerful for
what it is I want to do (simply to colorize a few 'print' outputs to
the console).

I have looked for that last week and the best I could find was
ColorANSI module, distributed with ipython (in a debian system, it's
/usr/share/python-support/ipython/IPython/ColorANSI.py).

I just bookmarked it, and don't know how to make it work. But it seems
quite simple.

Tiago.


More information about the Tutor mailing list