Commit 06912b77 authored by Fred Drake's avatar Fred Drake

Use string methods. Organize the imports in Python Normal Form.

parent 4fe904d3
...@@ -25,13 +25,13 @@ Supported options: ...@@ -25,13 +25,13 @@ Supported options:
--uptitle str Set the upward link title. The default is 'Python --uptitle str Set the upward link title. The default is 'Python
Documentation Index'. Documentation Index'.
""" """
import buildindex
import os import os
import re import re
import string
import support
import sys import sys
import buildindex
import support
class IndexOptions(support.Options): class IndexOptions(support.Options):
aesop_type = "links" aesop_type = "links"
...@@ -119,10 +119,10 @@ def main(): ...@@ -119,10 +119,10 @@ def main():
] ]
if has_plat_flag: if has_plat_flag:
parts.insert(1, PLAT_DISCUSS) parts.insert(1, PLAT_DISCUSS)
html = string.join(parts, '') html = ''.join(parts)
program = os.path.basename(sys.argv[0]) program = os.path.basename(sys.argv[0])
fp = options.get_output_file() fp = options.get_output_file()
fp.write(string.rstrip(html) + "\n") fp.write(html.rstrip() + "\n")
if options.outputfile == "-": if options.outputfile == "-":
sys.stderr.write("%s: %d index nodes\n" % (program, num_nodes)) sys.stderr.write("%s: %d index nodes\n" % (program, num_nodes))
else: else:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment