[Python-checkins] CVS: python/dist/src/Doc/tools mkackshtml,1.1,1.2 mkmodindex,1.10,1.11
Fred L. Drake
fdrake@users.sourceforge.net
Mon, 12 Feb 2001 11:12:57 -0800
Update of /cvsroot/python/python/dist/src/Doc/tools
In directory usw-pr-cvs1:/tmp/cvs-serv9334
Modified Files:
mkackshtml mkmodindex
Log Message:
Jon Nelson <jnelson@users.sourceforge.net>:
Make the documentation tools work with Python 1.5.2.
[Slightly modified from submitted patch. --FLD]
This closes SF bug #132005.
Index: mkackshtml
===================================================================
RCS file: /cvsroot/python/python/dist/src/Doc/tools/mkackshtml,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -r1.1 -r1.2
*** mkackshtml 2000/10/05 05:15:29 1.1
--- mkackshtml 2001/02/12 19:12:55 1.2
***************
*** 2,5 ****
--- 2,6 ----
# -*- Python -*-
+ import string
import support
import sys
***************
*** 12,16 ****
if not line:
break
! line = line.strip()
if line:
names.append(line)
--- 13,17 ----
if not line:
break
! line = string.strip(line)
if line:
names.append(line)
***************
*** 27,46 ****
names = collect(sys.stdin)
percol = (len(names) + options.columns - 1) / options.columns
! colnums = [percol*i for i in range(options.columns)]
fp = options.get_output_file()
! print >>fp, options.get_header().rstrip()
! print >>fp, THANKS
! print >>fp, '<table width="100%" align="center">'
for i in range(percol):
! print >>fp, " <tr>"
for j in colnums:
try:
! print >>fp, " <td>%s</td>" % names[i + j]
except IndexError:
! print >>fp, " <td> </td>"
! print >>fp, " </tr>"
! print >>fp, "</table>"
! print >>fp, options.get_footer().rstrip()
!
THANKS = '''\
--- 28,49 ----
names = collect(sys.stdin)
percol = (len(names) + options.columns - 1) / options.columns
! colnums = []
! for i in range(options.columns):
! colnums.append(percol*i)
fp = options.get_output_file()
! fp.write(string.rstrip(options.get_header()) + "\n")
! fp.write(THANKS + "\n")
! fp.write('<table width="100%" align="center">\n')
for i in range(percol):
! fp.write(" <tr>\n")
for j in colnums:
try:
! fp.write(" <td>%s</td>\n" % names[i + j])
except IndexError:
! pass
! fp.write(" </tr>\n")
! fp.write("</table>\n")
! fp.write(string.rstrip(options.get_footer()) + "\n")
! fp.close()
THANKS = '''\
Index: mkmodindex
===================================================================
RCS file: /cvsroot/python/python/dist/src/Doc/tools/mkmodindex,v
retrieving revision 1.10
retrieving revision 1.11
diff -C2 -r1.10 -r1.11
*** mkmodindex 2001/02/12 15:30:22 1.10
--- mkmodindex 2001/02/12 19:12:55 1.11
***************
*** 53,58 ****
def __init__(self, link, str, seqno):
! parts = str.split(None, 1)
! if parts[0].endswith("</tt>"):
self.modname = parts[0][:-5]
else:
--- 53,58 ----
def __init__(self, link, str, seqno):
! parts = string.split(str, None, 1)
! if parts[0][-5:] == "</tt>":
self.modname = parts[0][:-5]
else: