diff options
author | Ka-Ping Yee <ping@zesty.ca> | 2001-04-13 11:02:51 (GMT) |
---|---|---|
committer | Ka-Ping Yee <ping@zesty.ca> | 2001-04-13 11:02:51 (GMT) |
commit | da79389f100366a4e221e30b45da6f33e6f8ec34 (patch) | |
tree | db8fa1a2833ac174e106090ff83883c5ec3ac7db /Lib/pydoc.py | |
parent | 79c009d767be302b17b24321f3175039cbf9e408 (diff) | |
download | cpython-da79389f100366a4e221e30b45da6f33e6f8ec34.zip cpython-da79389f100366a4e221e30b45da6f33e6f8ec34.tar.gz cpython-da79389f100366a4e221e30b45da6f33e6f8ec34.tar.bz2 |
Word-wrap the list of cross-references.
Diffstat (limited to 'Lib/pydoc.py')
-rwxr-xr-x | Lib/pydoc.py | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/Lib/pydoc.py b/Lib/pydoc.py index 7e77038..1bce955 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: |