changing colors in python

Claudio Grondi claudio.grondi at freenet.de
Sat Apr 16 19:52:22 EDT 2005


The readline module (used e.g. in IPython)
http://sourceforge.net/project/showfiles.php?group_id=82407
provides the Console.py
script and in my own version of it, the (extended)
Console() class supports any ANSI escape
sequences of the form ESC[#m and ESC[#,#m ,
making it possible to set any by console supported
text and background colors.
http://people.freenet.de/AiTI-IT/Python/Console.py

Replace the Console.py of the readline
module with my extended version and run
it as main script to see the coloured output
looking into the code to see how it comes.

Claudio
http://www.python.org/moin/ClaudioGrondi


"GujuBoy" <dirgesh at gmail.com> schrieb im Newsbeitrag
news:1113511856.510914.103960 at z14g2000cwz.googlegroups.com...
> i have a ansi.py file that i use in LINUX to change the text color to
> STDOUT when i use the "print" function...but when i move this ansi.py
> file over the windows...it does not work
>
> is there a version of ansi.py i can use for windows/linux....
>
> please help
>





More information about the Python-list mailing list