diff --git a/Doc/tools/support.py b/Doc/tools/support.py
index b96c4ddbe6a..30d4575cb64 100644
--- a/Doc/tools/support.py
+++ b/Doc/tools/support.py
@@ -8,6 +8,7 @@ __version__ = '$Revision$'
import getopt
+import os.path
import sys
@@ -18,7 +19,7 @@ class Options:
"columns=", "help", "output=",
# content components
- "address=", "iconserver=",
+ "address=", "iconserver=", "favicon=",
"title=", "uplink=", "uptitle="]
outputfile = "-"
@@ -26,6 +27,7 @@ class Options:
letters = 0
uplink = "index.html"
uptitle = "Python Documentation Index"
+ favicon = None
# The "Aesop Meta Tag" is poorly described, and may only be used
# by the Aesop search engine (www.aesop.com), but doesn't hurt.
@@ -89,6 +91,8 @@ class Options:
self.uptitle = val.strip()
elif opt == "--iconserver":
self.variables["iconserver"] = val.strip() or "."
+ elif opt == "--favicon":
+ self.favicon = val.strip()
else:
self.handle_option(opt, val)
if self.uplink and self.uptitle:
@@ -114,11 +118,20 @@ class Options:
repl = " %s\n" % link
s = s.replace("", repl, 1)
if self.aesop_type:
- meta = '\n '
+ meta = '\n ' % self.aesop_type
# Insert this in the middle of the head that's been
# generated so far, keeping and elements in
# neat groups:
s = s.replace("\n '
+ % (self.favicon, type))
+ s = s.replace("