Mercurial > cpython-lru_cache-weakref
annotate Doc/tools/support.py @ 25838:8540887bcec6 2.2
Backport of 2.183:
Fix memory leak in add_subclass() found by NealN with valgrind.
| author | Guido van Rossum <guido@python.org> |
|---|---|
| date | Fri, 18 Oct 2002 13:42:21 +0000 |
| parents | 828cb0c2c480 |
| children | 5043b738b072 |
| rev | line source |
|---|---|
|
15026
b368e06a3b62
Better add at least a short docstring to the module!
Fred Drake <fdrake@acm.org>
parents:
15020
diff
changeset
|
1 """Miscellaneous support code shared by some of the tool scripts. |
|
b368e06a3b62
Better add at least a short docstring to the module!
Fred Drake <fdrake@acm.org>
parents:
15020
diff
changeset
|
2 |
|
b368e06a3b62
Better add at least a short docstring to the module!
Fred Drake <fdrake@acm.org>
parents:
15020
diff
changeset
|
3 This includes option parsing code, HTML formatting code, and a couple of |
|
b368e06a3b62
Better add at least a short docstring to the module!
Fred Drake <fdrake@acm.org>
parents:
15020
diff
changeset
|
4 useful helpers. |
|
b368e06a3b62
Better add at least a short docstring to the module!
Fred Drake <fdrake@acm.org>
parents:
15020
diff
changeset
|
5 |
|
15020
405ad0a7f7a6
Factor out some of the presentation and shared code from mkmodindex and
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
6 """ |
|
405ad0a7f7a6
Factor out some of the presentation and shared code from mkmodindex and
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
7 __version__ = '$Revision$' |
|
405ad0a7f7a6
Factor out some of the presentation and shared code from mkmodindex and
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
8 |
|
405ad0a7f7a6
Factor out some of the presentation and shared code from mkmodindex and
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
9 |
|
405ad0a7f7a6
Factor out some of the presentation and shared code from mkmodindex and
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
10 import getopt |
|
16570
8657384dcc4a
Jon Nelson <jnelson@users.sourceforge.net>:
Fred Drake <fdrake@acm.org>
parents:
15026
diff
changeset
|
11 import string |
|
15020
405ad0a7f7a6
Factor out some of the presentation and shared code from mkmodindex and
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
12 import sys |
|
405ad0a7f7a6
Factor out some of the presentation and shared code from mkmodindex and
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
13 |
|
405ad0a7f7a6
Factor out some of the presentation and shared code from mkmodindex and
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
14 |
|
405ad0a7f7a6
Factor out some of the presentation and shared code from mkmodindex and
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
15 class Options: |
|
405ad0a7f7a6
Factor out some of the presentation and shared code from mkmodindex and
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
16 __short_args = "a:c:ho:" |
|
405ad0a7f7a6
Factor out some of the presentation and shared code from mkmodindex and
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
17 __long_args = [ |
|
405ad0a7f7a6
Factor out some of the presentation and shared code from mkmodindex and
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
18 # script controls |
|
405ad0a7f7a6
Factor out some of the presentation and shared code from mkmodindex and
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
19 "columns=", "help", "output=", |
|
405ad0a7f7a6
Factor out some of the presentation and shared code from mkmodindex and
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
20 |
|
405ad0a7f7a6
Factor out some of the presentation and shared code from mkmodindex and
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
21 # content components |
|
405ad0a7f7a6
Factor out some of the presentation and shared code from mkmodindex and
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
22 "address=", "iconserver=", |
|
405ad0a7f7a6
Factor out some of the presentation and shared code from mkmodindex and
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
23 "title=", "uplink=", "uptitle="] |
|
405ad0a7f7a6
Factor out some of the presentation and shared code from mkmodindex and
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
24 |
|
405ad0a7f7a6
Factor out some of the presentation and shared code from mkmodindex and
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
25 outputfile = "-" |
|
405ad0a7f7a6
Factor out some of the presentation and shared code from mkmodindex and
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
26 columns = 1 |
|
405ad0a7f7a6
Factor out some of the presentation and shared code from mkmodindex and
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
27 letters = 0 |
|
405ad0a7f7a6
Factor out some of the presentation and shared code from mkmodindex and
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
28 uplink = "./" |
|
405ad0a7f7a6
Factor out some of the presentation and shared code from mkmodindex and
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
29 uptitle = "Python Documentation Index" |
|
405ad0a7f7a6
Factor out some of the presentation and shared code from mkmodindex and
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
30 |
|
405ad0a7f7a6
Factor out some of the presentation and shared code from mkmodindex and
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
31 def __init__(self): |
|
405ad0a7f7a6
Factor out some of the presentation and shared code from mkmodindex and
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
32 self.args = [] |
|
405ad0a7f7a6
Factor out some of the presentation and shared code from mkmodindex and
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
33 self.variables = {"address": "", |
|
405ad0a7f7a6
Factor out some of the presentation and shared code from mkmodindex and
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
34 "iconserver": "icons", |
|
405ad0a7f7a6
Factor out some of the presentation and shared code from mkmodindex and
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
35 "imgtype": "gif", |
|
405ad0a7f7a6
Factor out some of the presentation and shared code from mkmodindex and
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
36 "title": "Global Module Index", |
|
405ad0a7f7a6
Factor out some of the presentation and shared code from mkmodindex and
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
37 } |
|
405ad0a7f7a6
Factor out some of the presentation and shared code from mkmodindex and
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
38 |
|
405ad0a7f7a6
Factor out some of the presentation and shared code from mkmodindex and
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
39 def add_args(self, short=None, long=None): |
|
405ad0a7f7a6
Factor out some of the presentation and shared code from mkmodindex and
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
40 if short: |
|
16570
8657384dcc4a
Jon Nelson <jnelson@users.sourceforge.net>:
Fred Drake <fdrake@acm.org>
parents:
15026
diff
changeset
|
41 self.__short_args = self.__short_args + short |
|
15020
405ad0a7f7a6
Factor out some of the presentation and shared code from mkmodindex and
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
42 if long: |
|
16570
8657384dcc4a
Jon Nelson <jnelson@users.sourceforge.net>:
Fred Drake <fdrake@acm.org>
parents:
15026
diff
changeset
|
43 self.__long_args = self.__long_args + long |
|
15020
405ad0a7f7a6
Factor out some of the presentation and shared code from mkmodindex and
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
44 |
|
405ad0a7f7a6
Factor out some of the presentation and shared code from mkmodindex and
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
45 def parse(self, args): |
|
405ad0a7f7a6
Factor out some of the presentation and shared code from mkmodindex and
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
46 try: |
|
405ad0a7f7a6
Factor out some of the presentation and shared code from mkmodindex and
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
47 opts, args = getopt.getopt(args, self.__short_args, |
|
405ad0a7f7a6
Factor out some of the presentation and shared code from mkmodindex and
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
48 self.__long_args) |
|
405ad0a7f7a6
Factor out some of the presentation and shared code from mkmodindex and
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
49 except getopt.error: |
|
405ad0a7f7a6
Factor out some of the presentation and shared code from mkmodindex and
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
50 sys.stdout = sys.stderr |
|
405ad0a7f7a6
Factor out some of the presentation and shared code from mkmodindex and
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
51 self.usage() |
|
405ad0a7f7a6
Factor out some of the presentation and shared code from mkmodindex and
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
52 sys.exit(2) |
|
16570
8657384dcc4a
Jon Nelson <jnelson@users.sourceforge.net>:
Fred Drake <fdrake@acm.org>
parents:
15026
diff
changeset
|
53 self.args = self.args + args |
|
15020
405ad0a7f7a6
Factor out some of the presentation and shared code from mkmodindex and
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
54 for opt, val in opts: |
|
405ad0a7f7a6
Factor out some of the presentation and shared code from mkmodindex and
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
55 if opt in ("-a", "--address"): |
|
16570
8657384dcc4a
Jon Nelson <jnelson@users.sourceforge.net>:
Fred Drake <fdrake@acm.org>
parents:
15026
diff
changeset
|
56 val = string.strip(val) |
|
15020
405ad0a7f7a6
Factor out some of the presentation and shared code from mkmodindex and
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
57 if val: |
|
405ad0a7f7a6
Factor out some of the presentation and shared code from mkmodindex and
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
58 val = "<address>\n%s\n</address>\n" % val |
|
405ad0a7f7a6
Factor out some of the presentation and shared code from mkmodindex and
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
59 self.variables["address"] = val |
|
405ad0a7f7a6
Factor out some of the presentation and shared code from mkmodindex and
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
60 elif opt in ("-h", "--help"): |
|
405ad0a7f7a6
Factor out some of the presentation and shared code from mkmodindex and
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
61 self.usage() |
|
405ad0a7f7a6
Factor out some of the presentation and shared code from mkmodindex and
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
62 sys.exit() |
|
405ad0a7f7a6
Factor out some of the presentation and shared code from mkmodindex and
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
63 elif opt in ("-o", "--output"): |
|
405ad0a7f7a6
Factor out some of the presentation and shared code from mkmodindex and
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
64 self.outputfile = val |
|
405ad0a7f7a6
Factor out some of the presentation and shared code from mkmodindex and
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
65 elif opt in ("-c", "--columns"): |
|
405ad0a7f7a6
Factor out some of the presentation and shared code from mkmodindex and
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
66 self.columns = int(val) |
|
405ad0a7f7a6
Factor out some of the presentation and shared code from mkmodindex and
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
67 elif opt == "--title": |
|
405ad0a7f7a6
Factor out some of the presentation and shared code from mkmodindex and
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
68 self.variables["title"] = val.strip() |
|
405ad0a7f7a6
Factor out some of the presentation and shared code from mkmodindex and
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
69 elif opt == "--uplink": |
|
405ad0a7f7a6
Factor out some of the presentation and shared code from mkmodindex and
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
70 self.uplink = val.strip() |
|
405ad0a7f7a6
Factor out some of the presentation and shared code from mkmodindex and
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
71 elif opt == "--uptitle": |
|
405ad0a7f7a6
Factor out some of the presentation and shared code from mkmodindex and
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
72 self.uptitle = val.strip() |
|
405ad0a7f7a6
Factor out some of the presentation and shared code from mkmodindex and
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
73 elif opt == "--iconserver": |
|
405ad0a7f7a6
Factor out some of the presentation and shared code from mkmodindex and
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
74 self.variables["iconserver"] = val.strip() or "." |
|
405ad0a7f7a6
Factor out some of the presentation and shared code from mkmodindex and
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
75 else: |
|
405ad0a7f7a6
Factor out some of the presentation and shared code from mkmodindex and
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
76 self.handle_option(opt, val) |
|
405ad0a7f7a6
Factor out some of the presentation and shared code from mkmodindex and
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
77 if self.uplink and self.uptitle: |
|
405ad0a7f7a6
Factor out some of the presentation and shared code from mkmodindex and
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
78 self.variables["uplinkalt"] = "up" |
|
405ad0a7f7a6
Factor out some of the presentation and shared code from mkmodindex and
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
79 self.variables["uplinkicon"] = "up" |
|
405ad0a7f7a6
Factor out some of the presentation and shared code from mkmodindex and
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
80 else: |
|
405ad0a7f7a6
Factor out some of the presentation and shared code from mkmodindex and
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
81 self.variables["uplinkalt"] = "" |
|
405ad0a7f7a6
Factor out some of the presentation and shared code from mkmodindex and
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
82 self.variables["uplinkicon"] = "blank" |
|
405ad0a7f7a6
Factor out some of the presentation and shared code from mkmodindex and
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
83 self.variables["uplink"] = self.uplink |
|
405ad0a7f7a6
Factor out some of the presentation and shared code from mkmodindex and
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
84 self.variables["uptitle"] = self.uptitle |
|
405ad0a7f7a6
Factor out some of the presentation and shared code from mkmodindex and
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
85 |
|
405ad0a7f7a6
Factor out some of the presentation and shared code from mkmodindex and
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
86 def handle_option(self, opt, val): |
|
405ad0a7f7a6
Factor out some of the presentation and shared code from mkmodindex and
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
87 raise getopt.error("option %s not recognized" % opt) |
|
405ad0a7f7a6
Factor out some of the presentation and shared code from mkmodindex and
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
88 |
|
405ad0a7f7a6
Factor out some of the presentation and shared code from mkmodindex and
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
89 def get_header(self): |
|
20609
828cb0c2c480
Do a little bit more to try and add <link> elements to the header, not that
Fred Drake <fdrake@acm.org>
parents:
16570
diff
changeset
|
90 s = HEAD % self.variables |
|
828cb0c2c480
Do a little bit more to try and add <link> elements to the header, not that
Fred Drake <fdrake@acm.org>
parents:
16570
diff
changeset
|
91 if self.uplink: |
|
828cb0c2c480
Do a little bit more to try and add <link> elements to the header, not that
Fred Drake <fdrake@acm.org>
parents:
16570
diff
changeset
|
92 if self.uptitle: |
|
828cb0c2c480
Do a little bit more to try and add <link> elements to the header, not that
Fred Drake <fdrake@acm.org>
parents:
16570
diff
changeset
|
93 link = ('<link rel="up" href="%s" title="%s">' |
|
828cb0c2c480
Do a little bit more to try and add <link> elements to the header, not that
Fred Drake <fdrake@acm.org>
parents:
16570
diff
changeset
|
94 % (self.uplink, self.uptitle)) |
|
828cb0c2c480
Do a little bit more to try and add <link> elements to the header, not that
Fred Drake <fdrake@acm.org>
parents:
16570
diff
changeset
|
95 else: |
|
828cb0c2c480
Do a little bit more to try and add <link> elements to the header, not that
Fred Drake <fdrake@acm.org>
parents:
16570
diff
changeset
|
96 link = '<link rel="up" href="%s">' % self.uplink |
|
828cb0c2c480
Do a little bit more to try and add <link> elements to the header, not that
Fred Drake <fdrake@acm.org>
parents:
16570
diff
changeset
|
97 repl = " %s\n</head>" % link |
|
828cb0c2c480
Do a little bit more to try and add <link> elements to the header, not that
Fred Drake <fdrake@acm.org>
parents:
16570
diff
changeset
|
98 s = s.replace("</head>", repl, 1) |
|
828cb0c2c480
Do a little bit more to try and add <link> elements to the header, not that
Fred Drake <fdrake@acm.org>
parents:
16570
diff
changeset
|
99 return s |
|
15020
405ad0a7f7a6
Factor out some of the presentation and shared code from mkmodindex and
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
100 |
|
405ad0a7f7a6
Factor out some of the presentation and shared code from mkmodindex and
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
101 def get_footer(self): |
|
405ad0a7f7a6
Factor out some of the presentation and shared code from mkmodindex and
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
102 return TAIL % self.variables |
|
405ad0a7f7a6
Factor out some of the presentation and shared code from mkmodindex and
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
103 |
|
405ad0a7f7a6
Factor out some of the presentation and shared code from mkmodindex and
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
104 def get_output_file(self, filename=None): |
|
405ad0a7f7a6
Factor out some of the presentation and shared code from mkmodindex and
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
105 if filename is None: |
|
405ad0a7f7a6
Factor out some of the presentation and shared code from mkmodindex and
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
106 filename = self.outputfile |
|
405ad0a7f7a6
Factor out some of the presentation and shared code from mkmodindex and
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
107 if filename == "-": |
|
405ad0a7f7a6
Factor out some of the presentation and shared code from mkmodindex and
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
108 return sys.stdout |
|
405ad0a7f7a6
Factor out some of the presentation and shared code from mkmodindex and
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
109 else: |
|
405ad0a7f7a6
Factor out some of the presentation and shared code from mkmodindex and
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
110 return open(filename, "w") |
|
405ad0a7f7a6
Factor out some of the presentation and shared code from mkmodindex and
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
111 |
|
405ad0a7f7a6
Factor out some of the presentation and shared code from mkmodindex and
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
112 |
|
405ad0a7f7a6
Factor out some of the presentation and shared code from mkmodindex and
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
113 NAVIGATION = '''\ |
|
405ad0a7f7a6
Factor out some of the presentation and shared code from mkmodindex and
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
114 <div class="navigation"> |
|
405ad0a7f7a6
Factor out some of the presentation and shared code from mkmodindex and
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
115 <table width="100%%" cellpadding="0" cellspacing="2"> |
|
405ad0a7f7a6
Factor out some of the presentation and shared code from mkmodindex and
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
116 <tr> |
|
405ad0a7f7a6
Factor out some of the presentation and shared code from mkmodindex and
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
117 <td><img width="32" height="32" align="bottom" border="0" alt="" |
|
405ad0a7f7a6
Factor out some of the presentation and shared code from mkmodindex and
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
118 src="%(iconserver)s/blank.%(imgtype)s"></td> |
|
405ad0a7f7a6
Factor out some of the presentation and shared code from mkmodindex and
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
119 <td><a href="%(uplink)s" |
|
405ad0a7f7a6
Factor out some of the presentation and shared code from mkmodindex and
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
120 title="%(uptitle)s"><img width="32" height="32" align="bottom" border="0" |
|
405ad0a7f7a6
Factor out some of the presentation and shared code from mkmodindex and
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
121 alt="%(uplinkalt)s" |
|
405ad0a7f7a6
Factor out some of the presentation and shared code from mkmodindex and
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
122 src="%(iconserver)s/%(uplinkicon)s.%(imgtype)s"></a></td> |
|
405ad0a7f7a6
Factor out some of the presentation and shared code from mkmodindex and
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
123 <td><img width="32" height="32" align="bottom" border="0" alt="" |
|
405ad0a7f7a6
Factor out some of the presentation and shared code from mkmodindex and
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
124 src="%(iconserver)s/blank.%(imgtype)s"></td> |
|
405ad0a7f7a6
Factor out some of the presentation and shared code from mkmodindex and
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
125 <td align="center" width="100%%">%(title)s</td> |
|
405ad0a7f7a6
Factor out some of the presentation and shared code from mkmodindex and
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
126 <td><img width="32" height="32" align="bottom" border="0" alt="" |
|
405ad0a7f7a6
Factor out some of the presentation and shared code from mkmodindex and
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
127 src="%(iconserver)s/blank.%(imgtype)s"></td> |
|
405ad0a7f7a6
Factor out some of the presentation and shared code from mkmodindex and
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
128 <td><img width="32" height="32" align="bottom" border="0" alt="" |
|
405ad0a7f7a6
Factor out some of the presentation and shared code from mkmodindex and
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
129 src="%(iconserver)s/blank.%(imgtype)s"></td> |
|
405ad0a7f7a6
Factor out some of the presentation and shared code from mkmodindex and
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
130 <td><img width="32" height="32" align="bottom" border="0" alt="" |
|
405ad0a7f7a6
Factor out some of the presentation and shared code from mkmodindex and
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
131 src="%(iconserver)s/blank.%(imgtype)s"></td> |
|
405ad0a7f7a6
Factor out some of the presentation and shared code from mkmodindex and
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
132 </tr></table> |
|
405ad0a7f7a6
Factor out some of the presentation and shared code from mkmodindex and
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
133 <b class="navlabel">Up:</b> <span class="sectref"><a href="%(uplink)s" |
|
405ad0a7f7a6
Factor out some of the presentation and shared code from mkmodindex and
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
134 title="%(uptitle)s">%(uptitle)s</A></span> |
|
405ad0a7f7a6
Factor out some of the presentation and shared code from mkmodindex and
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
135 <br></div> |
|
405ad0a7f7a6
Factor out some of the presentation and shared code from mkmodindex and
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
136 ''' |
|
405ad0a7f7a6
Factor out some of the presentation and shared code from mkmodindex and
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
137 |
|
405ad0a7f7a6
Factor out some of the presentation and shared code from mkmodindex and
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
138 HEAD = '''\ |
|
405ad0a7f7a6
Factor out some of the presentation and shared code from mkmodindex and
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
139 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> |
|
405ad0a7f7a6
Factor out some of the presentation and shared code from mkmodindex and
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
140 <html> |
|
405ad0a7f7a6
Factor out some of the presentation and shared code from mkmodindex and
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
141 <head> |
|
405ad0a7f7a6
Factor out some of the presentation and shared code from mkmodindex and
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
142 <title>%(title)s</title> |
|
405ad0a7f7a6
Factor out some of the presentation and shared code from mkmodindex and
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
143 <meta name="description" content="%(title)s"> |
|
405ad0a7f7a6
Factor out some of the presentation and shared code from mkmodindex and
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
144 <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> |
|
405ad0a7f7a6
Factor out some of the presentation and shared code from mkmodindex and
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
145 <link rel="STYLESHEET" href="lib/lib.css"> |
|
405ad0a7f7a6
Factor out some of the presentation and shared code from mkmodindex and
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
146 </head> |
|
405ad0a7f7a6
Factor out some of the presentation and shared code from mkmodindex and
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
147 <body> |
|
405ad0a7f7a6
Factor out some of the presentation and shared code from mkmodindex and
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
148 ''' + NAVIGATION + '''\ |
|
405ad0a7f7a6
Factor out some of the presentation and shared code from mkmodindex and
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
149 <hr> |
|
405ad0a7f7a6
Factor out some of the presentation and shared code from mkmodindex and
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
150 |
|
405ad0a7f7a6
Factor out some of the presentation and shared code from mkmodindex and
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
151 <h2>%(title)s</h2> |
|
405ad0a7f7a6
Factor out some of the presentation and shared code from mkmodindex and
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
152 |
|
405ad0a7f7a6
Factor out some of the presentation and shared code from mkmodindex and
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
153 ''' |
|
405ad0a7f7a6
Factor out some of the presentation and shared code from mkmodindex and
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
154 |
|
405ad0a7f7a6
Factor out some of the presentation and shared code from mkmodindex and
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
155 TAIL = "<hr>\n" + NAVIGATION + '''\ |
|
405ad0a7f7a6
Factor out some of the presentation and shared code from mkmodindex and
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
156 %(address)s</body> |
|
405ad0a7f7a6
Factor out some of the presentation and shared code from mkmodindex and
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
157 </html> |
|
405ad0a7f7a6
Factor out some of the presentation and shared code from mkmodindex and
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
158 ''' |
