error/warning color customization in interactive console?

Zentrader zentraders at gmail.com
Wed Jan 16 15:50:17 EST 2008


On Jan 15, 5:44 pm, yhvh <yhvh2... at googlemail.com> wrote:
> Is it possible to output error messages in a different color?
> I'm using Terminal on Gnome.

For the few times that I want to do this, this simple form works with
xterm.
for j in range(1,10):
   os.system("tput setaf "+str(j))
   print "test for ", j



More information about the Python-list mailing list