From: "Jeff Epler" <jepler@unpythonic.net> > On Wed, Aug 21, 2002 at 01:15:22PM -0400, David Abrahams wrote: > > I recently added an invocation to help(my_extension_module) to the > > Boost.Python test suite, to prove that I can give reasonable help output. > > Worked great for me, since I was always running the test from within emacs. > > However, some other developer complained that the test required user > > intervention to run, since it would prompt at each screenful. So, I changed > > it to: > > > > print pydoc.TextDoc().docmodule(my_extension_module) > > > > Now I get (well, I'm not sure how this will show up in your mailer, but for > > me it's full of control characters): > > In my mailer, X^HX is displayed as a bold X. It's an old trick of > impact printers and interpreted by fine unix screen pagers such as > "less". Figured it was something like that. > I'm not sure how to disable it. However, > re.sub("\10.", "", s) > should remove it from "s" without hurting anything else. I don't know > if pydoc produces underlines. If underlines > are expressed as X^H_, then it'll convert those to regular text too. > But if underlines are _^HX, you'll want to use > re.sub(".\10", "", s) > instead. That'll work for both bold and underline. I didn't want to resort to that, but then I also thought it would be uglier than it turned out to be. Thanks! ----------------------------------------------------------- David Abrahams * Boost Consulting dave@boost-consulting.com * http://www.boost-consulting.com
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4