Use string methods.
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)