diff options
author | Fred Drake <fdrake@acm.org> | 1998-12-28 20:46:53 (GMT) |
---|---|---|
committer | Fred Drake <fdrake@acm.org> | 1998-12-28 20:46:53 (GMT) |
commit | 03a0235793973cf319b48b21d10d945db27d3089 (patch) | |
tree | 7c7d46eef9a81aa201b69da84effd81f458f7a83 /Doc/tools | |
parent | 566c8327f7b5fa3a24a933e065886b4c95f3c08a (diff) | |
download | cpython-03a0235793973cf319b48b21d10d945db27d3089.zip cpython-03a0235793973cf319b48b21d10d945db27d3089.tar.gz cpython-03a0235793973cf319b48b21d10d945db27d3089.tar.bz2 |
Print a line to the console reporting the number of index nodes
processed. This can be interesting to see.
Diffstat (limited to 'Doc/tools')
-rwxr-xr-x | Doc/tools/buildindex.py | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/Doc/tools/buildindex.py b/Doc/tools/buildindex.py index 01805f3..e282f3c 100755 --- a/Doc/tools/buildindex.py +++ b/Doc/tools/buildindex.py @@ -1,9 +1,8 @@ #! /usr/bin/env python -""" -""" __version__ = '$Revision$' +import os import re import string import sys @@ -307,16 +306,21 @@ def main(): nodes = [] for fn in args: nodes = nodes + load(open(fn)) + num_nodes = len(nodes) nodes.sort() collapse(nodes) if letters: html = format_html_letters(nodes, columns) else: html = format_html(nodes, columns) + program = os.path.basename(sys.argv[0]) if ofn == "-": sys.stdout.write(html) + sys.stderr.write("\n%s: %d index nodes" % (program, num_nodes)) else: open(ofn, "w").write(html) + print + print "%s: %d index nodes" % (program, num_nodes) if __name__ == "__main__": |