Re: [Tutor] Print to std output with color

2011-01-26 Thread Karim
That's what I figured out at effbot website. Thanks for the additional link Alan! Regards Karim On 01/26/2011 07:27 PM, Alan Gauld wrote: "Karim" wrote Is there a simple way to print with color to stdout like the unix/linux example below: *print( '^[[1;31mThis is a warning!^[[0m' ) I sh

Re: [Tutor] Print to std output with color

2011-01-26 Thread Scott Nelson
> > Curses is one way to go. Another is to use the PyWin32 module discussed in > this thread: > I just realized I was assuming you were on Windows. If you are on another OS, the code I posted will obviously not work for you as it is specific to Windows. __

Re: [Tutor] Print to std output with color

2011-01-26 Thread Karim
Thanks Alan! I will go there have a look. Regards Karim On 01/26/2011 07:24 PM, Alan Gauld wrote: "Karim" wrote Is there a simple way to print with color to stdout like the unix/linux example below: *print( '^[[1;31mThis is a warning!^[[0m' ) Not generically since stdout is a data strea

Re: [Tutor] Print to std output with color

2011-01-26 Thread Karim
Thanks a lot Scott for the tip! Regards Karim On 01/26/2011 07:10 PM, Scott Nelson wrote: Curses is one way to go. Another is to use the PyWin32 module discussed in this thread: http://thread.gmane.org/gmane.comp.python.tutor/58450/focus=58454 Basically, here's a snippet of code that can get

Re: [Tutor] Print to std output with color

2011-01-26 Thread Tim Golden
On 26/01/2011 6:10 PM, Scott Nelson wrote: Curses is one way to go. Another is to use the PyWin32 module discussed in this thread: http://thread.gmane.org/gmane.comp.python.tutor/58450/focus=58454 Basically, here's a snippet of code that can get you started. This requires that you have the Py

Re: [Tutor] Print to std output with color

2011-01-26 Thread Alan Gauld
"Karim" wrote Is there a simple way to print with color to stdout like the unix/linux example below: *print( '^[[1;31mThis is a warning!^[[0m' ) I should have said the effbot solution (and WConio) are only for Windows. On Linux I think you are pretty well stuck with curses. I did find a si

Re: [Tutor] Print to std output with color

2011-01-26 Thread Alan Gauld
"Karim" wrote Is there a simple way to print with color to stdout like the unix/linux example below: *print( '^[[1;31mThis is a warning!^[[0m' ) Not generically since stdout is a data stream which may not be printed (it could be spoken for example - how does the synthesiser interpret colou

Re: [Tutor] Print to std output with color

2011-01-26 Thread Scott Nelson
Curses is one way to go. Another is to use the PyWin32 module discussed in this thread: http://thread.gmane.org/gmane.comp.python.tutor/58450/focus=58454 Basically, here's a snippet of code that can get you started. This requires that you have the PyWin32 module installed (already installed by

[Tutor] Print to std output with color

2011-01-26 Thread Karim
Hello all, Is there a simple way to print with color to stdout like the unix/linux example below: *print( '^[[1;31mThis is a warning!^[[0m' ) where <=> ^[ *I see thing with curses module. But is there an more simple object in other module to do the trick? Kind of _/decorate_output( mode=