blob: 36f4d2a9b0c777ebcdad1d34f27ac91fa6d89788 [file] [log] [blame]
Fred Drakef23431d2000-10-05 05:15:29 +00001#! /usr/bin/env python
2# -*- Python -*-
3
4import support
5import sys
6
7
8def collect(fp):
9 names = []
10 while 1:
11 line = fp.readline()
12 if not line:
13 break
14 line = line.strip()
15 if line:
16 names.append(line)
17 else:
18 names = []
19 return names
20
21
22def main():
23 options = support.Options()
24 options.columns = 4
25 options.variables["title"] = "Acknowledgements"
26 options.parse(sys.argv[1:])
27 names = collect(sys.stdin)
28 percol = (len(names) + options.columns - 1) / options.columns
29 colnums = [percol*i for i in range(options.columns)]
30 fp = options.get_output_file()
31 print >>fp, options.get_header().rstrip()
32 print >>fp, THANKS
33 print >>fp, '<table width="100%" align="center">'
34 for i in range(percol):
35 print >>fp, " <tr>"
36 for j in colnums:
37 try:
38 print >>fp, " <td>%s</td>" % names[i + j]
39 except IndexError:
40 print >>fp, " <td>&nbsp;</td>"
41 print >>fp, " </tr>"
42 print >>fp, "</table>"
43 print >>fp, options.get_footer().rstrip()
44
45
46THANKS = '''\
47
48<p>These people have contributed in some way to the Python
49documentation. This list is probably not complete -- if you feel that
50you or anyone else should be on this list, please let us know (send
51email to <a
52href="mailto:python-docs@python.org">python-docs@python.org</a>), and
53we will be glad to correct the problem.</p>
54
55<p>It is only with the input and contributions of the Python community
56that Python has such wonderful documentation -- <b>Thank You!</b></p>
57
58'''
59
60
61if __name__ == "__main__":
62 main()