[Python-checkins] CVS: python/dist/src/Lib pydoc.py,1.32,1.33

Ka-Ping Yee ping@users.sourceforge.net
Fri, 13 Apr 2001 04:02:53 -0700


Update of /cvsroot/python/python/dist/src/Lib
In directory usw-pr-cvs1:/tmp/cvs-serv32300

Modified Files:
	pydoc.py 
Log Message:
Word-wrap the list of cross-references.


Index: pydoc.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/pydoc.py,v
retrieving revision 1.32
retrieving revision 1.33
diff -C2 -r1.32 -r1.33
*** pydoc.py	2001/04/13 10:53:25	1.32
--- pydoc.py	2001/04/13 11:02:51	1.33
***************
*** 1399,1403 ****
          buffer = replace(buffer.getvalue(), '\xa0', ' ', '\n', '\n  ')
          pager('  ' + strip(buffer) + '\n')
!         if xrefs: self.output.write('\nRelated help topics: %s\n' % xrefs)
  
      def listmodules(self, key=''):
--- 1399,1407 ----
          buffer = replace(buffer.getvalue(), '\xa0', ' ', '\n', '\n  ')
          pager('  ' + strip(buffer) + '\n')
!         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=''):