From: Ka-Ping Yee Date: Fri, 13 Apr 2001 11:02:51 +0000 (+0000) Subject: Word-wrap the list of cross-references. X-Git-Tag: v2.1c1~33 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=da79389f100366a4e221e30b45da6f33e6f8ec34;p=thirdparty%2FPython%2Fcpython.git Word-wrap the list of cross-references. --- diff --git a/Lib/pydoc.py b/Lib/pydoc.py index 7e770388495e..1bce955ffa9f 100755 --- a/Lib/pydoc.py +++ b/Lib/pydoc.py @@ -1398,7 +1398,11 @@ please set the environment variable PYTHONDOCS to indicate their location. parser.feed(document) buffer = replace(buffer.getvalue(), '\xa0', ' ', '\n', '\n ') pager(' ' + strip(buffer) + '\n') - if xrefs: self.output.write('\nRelated help topics: %s\n' % xrefs) + if xrefs: + buffer = StringIO.StringIO() + formatter.DumbWriter(buffer).send_flowing_data( + 'Related help topics: ' + join(split(xrefs), ', ') + '\n') + self.output.write('\n%s\n' % buffer.getvalue()) def listmodules(self, key=''): if key: