[BangPypers] colored o/p

Noufal Ibrahim noufal at gmail.com
Tue Dec 20 18:41:47 CET 2011


Nitin Kumar <nitin.nitp at gmail.com> writes:

> Hi All,
>
> I am trying to format o/p (colored bold string) on console. say IDLE or
> python command prompt using python modules.

You *can* use curses (or the newly released blessings[1]) library. 

There are also a few recipes on activestate to do this. I remember using
one of them a few years ago but don't remember which. 

http://code.activestate.com/recipes/574451-handling-ansi-terminal/
http://code.activestate.com/recipes/475116-using-terminfo-for-portable-color-output-cursor-co/
http://code.activestate.com/recipes/576503-linux-terminal-color-setter/


[...]


Footnotes: 
[1]  http://pypi.python.org/pypi/blessings

-- 
~noufal
http://nibrahim.net.in

Assume a virtue, if you have it not. -William Shakespeare


More information about the BangPypers mailing list