Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 03a0235

Browse files
committed
Print a line to the console reporting the number of index nodes
processed. This can be interesting to see.
1 parent 566c832 commit 03a0235

1 file changed

Lines changed: 6 additions & 2 deletions

File tree

Doc/tools/buildindex.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,8 @@
11
#! /usr/bin/env python
22

3-
"""
4-
"""
53
__version__ = '$Revision$'
64

5+
import os
76
import re
87
import string
98
import sys
@@ -307,16 +306,21 @@ def main():
307306
nodes = []
308307
for fn in args:
309308
nodes = nodes + load(open(fn))
309+
num_nodes = len(nodes)
310310
nodes.sort()
311311
collapse(nodes)
312312
if letters:
313313
html = format_html_letters(nodes, columns)
314314
else:
315315
html = format_html(nodes, columns)
316+
program = os.path.basename(sys.argv[0])
316317
if ofn == "-":
317318
sys.stdout.write(html)
319+
sys.stderr.write("\n%s: %d index nodes" % (program, num_nodes))
318320
else:
319321
open(ofn, "w").write(html)
322+
print
323+
print "%s: %d index nodes" % (program, num_nodes)
320324

321325

322326
if __name__ == "__main__":

0 commit comments

Comments
 (0)