diff options
author | Fred Drake <fdrake@acm.org> | 2001-02-12 15:30:22 (GMT) |
---|---|---|
committer | Fred Drake <fdrake@acm.org> | 2001-02-12 15:30:22 (GMT) |
commit | b258bedb138587a30e13bac378b5a00ea5e4c7bf (patch) | |
tree | 14d70756acabe28eb2a6e0ac67ab8b1ae1348411 | |
parent | 90f22fee6bbd577c6d1d9206a143c006e1fe3d6b (diff) | |
download | cpython-b258bedb138587a30e13bac378b5a00ea5e4c7bf.zip cpython-b258bedb138587a30e13bac378b5a00ea5e4c7bf.tar.gz cpython-b258bedb138587a30e13bac378b5a00ea5e4c7bf.tar.bz2 |
Jon Nelson <jnelson@users.sourceforge.net>:
Make the documentation tools compatibile with Python 2.0.
-rwxr-xr-x | Doc/tools/mkhowto | 4 | ||||
-rwxr-xr-x | Doc/tools/mkmodindex | 4 | ||||
-rw-r--r-- | Doc/tools/support.py | 9 |
3 files changed, 9 insertions, 8 deletions
diff --git a/Doc/tools/mkhowto b/Doc/tools/mkhowto index 28f18b6..8826924 100755 --- a/Doc/tools/mkhowto +++ b/Doc/tools/mkhowto @@ -297,7 +297,7 @@ class Job: # let the doctype-specific handler do some intermediate work: # self.run("%s %s" % (binary, self.doc)) - self.latex_runs += 1 + self.latex_runs = self.latex_runs + 1 if os.path.isfile("mod%s.idx" % self.doc): self.run("%s -s %s mod%s.idx" % (MAKEINDEX_BINARY, ISTFILE, self.doc)) @@ -319,7 +319,7 @@ class Job: if self.use_bibtex: self.run("%s %s" % (BIBTEX_BINARY, self.doc)) self.run("%s %s" % (binary, self.doc)) - self.latex_runs += 1 + self.latex_runs = self.latex_runs + 1 def process_synopsis_files(self): synopsis_files = glob.glob(self.doc + "*.syn") diff --git a/Doc/tools/mkmodindex b/Doc/tools/mkmodindex index 3bc4b95..b0211a7 100755 --- a/Doc/tools/mkmodindex +++ b/Doc/tools/mkmodindex @@ -117,9 +117,9 @@ def main(): html = string.join(parts, '') program = os.path.basename(sys.argv[0]) fp = options.get_output_file() - print >>fp, html.rstrip() + fp.write(string.rstrip(html) + "\n") if options.outputfile == "-": - print >>sys.stderr, "%s: %d index nodes" % (program, num_nodes) + sys.stderr.write("%s: %d index nodes\n" % (program, num_nodes)) else: print print "%s: %d index nodes" % (program, num_nodes) diff --git a/Doc/tools/support.py b/Doc/tools/support.py index 86ecc6c..836adf4 100644 --- a/Doc/tools/support.py +++ b/Doc/tools/support.py @@ -8,6 +8,7 @@ __version__ = '$Revision$' import getopt +import string import sys @@ -37,9 +38,9 @@ class Options: def add_args(self, short=None, long=None): if short: - self.__short_args += short + self.__short_args = self.__short_args + short if long: - self.__long_args += long + self.__long_args = self.__long_args + long def parse(self, args): try: @@ -49,10 +50,10 @@ class Options: sys.stdout = sys.stderr self.usage() sys.exit(2) - self.args += args + self.args = self.args + args for opt, val in opts: if opt in ("-a", "--address"): - val = val.strip() + val = string.strip(val) if val: val = "<address>\n%s\n</address>\n" % val self.variables["address"] = val |