mirror of
https://github.com/python/cpython.git
synced 2025-07-24 03:35:53 +00:00
Print a line to the console reporting the number of index nodes
processed. This can be interesting to see.
This commit is contained in:
parent
566c8327f7
commit
03a0235793
1 changed files with 6 additions and 2 deletions
|
@ -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__":
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue