Unescaping formatted Terminal text

Gnarlodious gnarlodious at gmail.com
Fri Jun 3 10:21:20 EDT 2011


This may be happening because I am using Python 3.2 which includes
"curses" to format output. When running:

pydoc.render_doc(sys.modules[__name__])

in Terminal I see FUNCTIONS

when the same output goes to HTTP I see FFUUNNCCTTIIOONNSS

Is there an easy way to strip ANSI escaped characters from output for
CGI rendering?

-- Gnarlodious



More information about the Python-list mailing list