diff --git a/Doc/tools/buildindex.py b/Doc/tools/buildindex.py
index b40bd52..08fdb7b 100755
--- a/Doc/tools/buildindex.py
+++ b/Doc/tools/buildindex.py
@@ -2,7 +2,7 @@
 
 __version__ = '$Revision$'
 
-import os
+import os.path
 import re
 import string
 import sys
@@ -49,7 +49,7 @@
 
     def dump(self):
         return "%s\1%s###%s\n" \
-               % (string.join(self.links, "\1"),
+               % ("\1".join(self.links),
                   bang_join(self.text),
                   self.seqno)
 
@@ -294,7 +294,7 @@
     for letter, nodes in letter_groups:
         s = "<b><a href=\"#letter-%s\">%s</a></b>" % (letter, letter)
         items.append(s)
-    s = ["<hr><center>\n%s</center>\n" % string.join(items, " |\n")]
+    s = ["<hr><center>\n%s</center>\n" % " |\n".join(items)]
     for letter, nodes in letter_groups:
         s.append(format_letter(letter))
         s.append(format_nodes(nodes, columns))
diff --git a/Doc/tools/indfix.py b/Doc/tools/indfix.py
index 6e8e911..5bab0fb 100755
--- a/Doc/tools/indfix.py
+++ b/Doc/tools/indfix.py
@@ -19,13 +19,12 @@
 __version__ = '$Revision$'
 
 import re
-import string
 import StringIO
 import sys
 
 
-def cmp_entries(e1, e2, lower=string.lower):
-    return cmp(lower(e1[1]), lower(e2[1])) or cmp(e1, e2)
+def cmp_entries(e1, e2):
+    return cmp(e1[1].lower(), e2[1].lower()) or cmp(e1, e2)
 
 
 def dump_entries(write, entries):
diff --git a/Doc/tools/keywords.py b/Doc/tools/keywords.py
index 6da352a..876987d 100644
--- a/Doc/tools/keywords.py
+++ b/Doc/tools/keywords.py
@@ -2,11 +2,10 @@
 
 # This Python program sorts and reformats the table of keywords in ref2.tex
 
-import string
 l = []
 try:
 	while 1:
-		l = l + string.split(raw_input())
+		l = l + raw_input().split()
 except EOFError:
 	pass
 l.sort()
@@ -16,5 +15,5 @@
 nrows = (len(l)+ncols-1)/ncols
 for i in range(nrows):
 	for j in range(i, len(l), nrows):
-		print string.ljust(l[j], 10),
+		print l[j].ljust(10),
 	print
diff --git a/Doc/tools/refcounts.py b/Doc/tools/refcounts.py
index d7c761b..d82def7 100644
--- a/Doc/tools/refcounts.py
+++ b/Doc/tools/refcounts.py
@@ -2,7 +2,6 @@
 __version__ = '$Revision$'
 
 import os
-import string
 import sys
 
 
@@ -10,7 +9,7 @@
 try:
     p = os.path.dirname(__file__)
 except NameError:
-    p = sys.path[0]
+    p = os.path.dirname(sys.argv[0])
 p = os.path.normpath(os.path.join(os.getcwd(), p, os.pardir,
                                   "api", "refcounts.dat"))
 DEFAULT_PATH = p
@@ -27,11 +26,11 @@
         line = fp.readline()
         if not line:
             break
-        line = string.strip(line)
+        line = line.strip()
         if line[:1] in ("", "#"):
             # blank lines and comments
             continue
-        parts = string.split(line, ":", 4)
+        parts = line.split(":", 4)
         if len(parts) != 5:
             raise ValueError("Not enough fields in " + `line`)
         function, type, arg, refcount, comment = parts
diff --git a/Doc/tools/rewrite.py b/Doc/tools/rewrite.py
index e822bf5..f2c1b80 100644
--- a/Doc/tools/rewrite.py
+++ b/Doc/tools/rewrite.py
@@ -3,7 +3,6 @@
 Usage:  rewrite.py boilerplate.tex [VAR=value] ... <template >output
 """
 
-import string
 import sys
 import time
 
@@ -12,9 +11,9 @@
     s = fp.read()
 
     d = {}
-    start = string.find(s, r"\date{")
+    start = s.find(r"\date{")
     if start >= 0:
-        end = string.find(s, "}", start)
+        end = s.find("}", start)
         date = s[start+6:end]
         if date == r"\today":
             date = time.strftime("%B %d, %Y", time.localtime(time.time()))
@@ -28,14 +27,14 @@
         # yes, we actully need to load the replacement values
         d = get_info(open(sys.argv[1]))
         for arg in sys.argv[2:]:
-            name, value = string.split(arg, "=", 1)
+            name, value = arg.split("=", 1)
             d[name] = value
         start = 0
         while 1:
-            start = string.find(s, "@", start)
+            start = s.find("@", start)
             if start < 0:
                 break
-            end = string.find(s, "@", start+1)
+            end = s.find("@", start+1)
             name = s[start+1:end]
             if name:
                 value = d.get(name)
diff --git a/Doc/tools/support.py b/Doc/tools/support.py
index bc17c6e..b96c4dd 100644
--- a/Doc/tools/support.py
+++ b/Doc/tools/support.py
@@ -8,7 +8,6 @@
 
 
 import getopt
-import string
 import sys
 
 
@@ -71,7 +70,7 @@
         self.args = self.args + args
         for opt, val in opts:
             if opt in ("-a", "--address"):
-                val = string.strip(val)
+                val = val.strip()
                 if val:
                     val = "<address>\n%s\n</address>\n" % val
                     self.variables["address"] = val
diff --git a/Doc/tools/toc2bkm.py b/Doc/tools/toc2bkm.py
index 45c7ef8..636459a 100755
--- a/Doc/tools/toc2bkm.py
+++ b/Doc/tools/toc2bkm.py
@@ -58,7 +58,7 @@
         if m:
             stype, snum, title, pageno = m.group(1, 2, 3, 4)
             title = clean_title(title)
-            entry = (stype, snum, title, string.atoi(pageno), [])
+            entry = (stype, snum, title, int(pageno), [])
             if stype == level:
                 toc.append(entry)
             else:
@@ -99,7 +99,7 @@
             pos = start + 1
         else:
             break
-    title = string.translate(title, title_trans, "{}")
+    title = title.translate(title_trans, "{}")
     return title
 
 
