Coloring print lines

Risto Peränen no at
Mon Aug 25 16:24:23 CEST 2003

Sami Viitanen wrote:
> Hello,
> Is there an easy way to make script print text with differents colors to
> screen (shell)?
> I mean a script that can for example print lines in red if some error occurs
> in executing
> some information..
> --SV
> ----Thanks in advance.
If you're using python at X, best advice I canv give is Text-widget at 
Tkinter and RTFM (sorry couldn't resist temptation :) . Otherwise you 
probably have to fiddle with curses-library (unix-only).

Best way to gather information of execution is to open log-file, code 
couple of monkeys and let them crack system as much as possible. This is 
only my opinion. Coders are blind to their mistakes even at testing.

More information about the Python-list mailing list