On Sun, 22 Oct 2006 00:34:14 -0400, "Michael B. Trausch" <mike$#at^&[EMAIL PROTECTED]> wrote: >Alright... I am attempting to find a way to parse ANSI text from a >telnet application. However, I am experiencing a bit of trouble. > >What I want to do is have all ANSI sequences _removed_ from the output, >save for those that manage color codes or text presentation (in short, >the ones that are ESC[#m (with additional #s separated by ; characters). > The ones that are left, the ones that are the color codes, I want to >act on, and remove from the text stream, and display the text.
http://originalgamer.cvs.sourceforge.net/originalgamer/originalgamer/originalgamer/ansi.py?revision=1.12&view=markup may be of some interest. Jean-Paul -- http://mail.python.org/mailman/listinfo/python-list