On 2007-02-02, rzed <[EMAIL PROTECTED]> wrote:
> [EMAIL PROTECTED] wrote in
> news:[EMAIL PROTECTED]: 
>
>> On Feb 2, 1:16 pm, rzed <[EMAIL PROTECTED]> wrote:
>>> [EMAIL PROTECTED] wrote
>>> innews:[EMAIL PROTECTED]: 
>>>
>>> > Hi,
>>>
>>> >   I'm interested in printing out coloured lines of my
>>> >   application and
>>> > I don't know what to use. Can anybody give me an idea??
>>>
>>> You could speed up the process if you explain what your
>>> application is and what you mean by colored lines. Does your
>>> application emit output to a plotter, an ink-jet printer, or a
>>> color laser printer? Is it a drawing program? An editor in
>>> which you want lines colored to highlight context? It might be
>>> useful to know what system you are running as well. Just a
>>> little detail here. 
>>>
>>> --
>>> rzed
>> 
>> Well, yes, it's a program that prints out lines to the standard
>> output with a print command, and I want to print them coloured.
>> For example: 
>> 
>> print "Hello World!!"
>> 
>> I want it in red colour.
>> 
>> That's all.
>
> If you're on Linux, you could use the curses module. There may
> be a precompiled Windows version compatible with your Python
> version, or maybe not, but the Windows source is available, and
> you may be able to get it to work with your Python with some
> effort. Linux distros include curses, I think. For Windows
> curses, take a look at <http://adamv.com/dev/python/curses/>.
> You will understand why the phrase "Windows curses" is used, I
> expect. 

On Windows, there's pdcurses for DOS or ncurses for the Cygwin
platform, but I don't know how to get either to work with Python.

Far simpler to get working in Windows is Fredrik Lundh's Console.

  http://www.effbot.org/downloads/#console

If you're using Windowd 98 or earlier there are versions of a
Python readline library that provide cursor addressing and color
using the ANSI excape sequences.

-- 
Neil Cerutti
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to