Mercurial > cpython-lru_cache-weakref
annotate Tools/scripts/byext.py @ 71607:df415bfbb652 2.7
Document that atexit execution order is undefined (#9788)
| author | Éric Araujo <merwok@netwok.org> |
|---|---|
| date | Fri, 29 Jul 2011 18:04:24 +0200 |
| parents | b2d4e6fc4f19 |
| children | 9a57c9d4b0b4 |
| rev | line source |
|---|---|
|
26999
8ed472e5bcd4
Silly little script to print statistics (files, lines, words) by
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
1 #! /usr/bin/env python |
|
8ed472e5bcd4
Silly little script to print statistics (files, lines, words) by
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
2 |
|
8ed472e5bcd4
Silly little script to print statistics (files, lines, words) by
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
3 """Show file statistics by extension.""" |
|
8ed472e5bcd4
Silly little script to print statistics (files, lines, words) by
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
4 |
|
8ed472e5bcd4
Silly little script to print statistics (files, lines, words) by
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
5 import os |
|
8ed472e5bcd4
Silly little script to print statistics (files, lines, words) by
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
6 import sys |
|
8ed472e5bcd4
Silly little script to print statistics (files, lines, words) by
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
7 |
|
8ed472e5bcd4
Silly little script to print statistics (files, lines, words) by
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
8 class Stats: |
|
8ed472e5bcd4
Silly little script to print statistics (files, lines, words) by
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
9 |
|
8ed472e5bcd4
Silly little script to print statistics (files, lines, words) by
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
10 def __init__(self): |
|
8ed472e5bcd4
Silly little script to print statistics (files, lines, words) by
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
11 self.stats = {} |
|
8ed472e5bcd4
Silly little script to print statistics (files, lines, words) by
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
12 |
|
8ed472e5bcd4
Silly little script to print statistics (files, lines, words) by
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
13 def statargs(self, args): |
|
8ed472e5bcd4
Silly little script to print statistics (files, lines, words) by
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
14 for arg in args: |
|
8ed472e5bcd4
Silly little script to print statistics (files, lines, words) by
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
15 if os.path.isdir(arg): |
|
8ed472e5bcd4
Silly little script to print statistics (files, lines, words) by
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
16 self.statdir(arg) |
|
8ed472e5bcd4
Silly little script to print statistics (files, lines, words) by
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
17 elif os.path.isfile(arg): |
|
8ed472e5bcd4
Silly little script to print statistics (files, lines, words) by
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
18 self.statfile(arg) |
|
8ed472e5bcd4
Silly little script to print statistics (files, lines, words) by
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
19 else: |
|
37175
a18aa3fbdd4a
SF bug #1457411, fix errors using variables that don't exist.
Neal Norwitz <nnorwitz@gmail.com>
parents:
28557
diff
changeset
|
20 sys.stderr.write("Can't find %s\n" % arg) |
|
26999
8ed472e5bcd4
Silly little script to print statistics (files, lines, words) by
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
21 self.addstats("<???>", "unknown", 1) |
|
8ed472e5bcd4
Silly little script to print statistics (files, lines, words) by
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
22 |
|
8ed472e5bcd4
Silly little script to print statistics (files, lines, words) by
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
23 def statdir(self, dir): |
|
8ed472e5bcd4
Silly little script to print statistics (files, lines, words) by
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
24 self.addstats("<dir>", "dirs", 1) |
|
8ed472e5bcd4
Silly little script to print statistics (files, lines, words) by
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
25 try: |
|
71038
b2d4e6fc4f19
Minimal changes to make byext.py script work with Python 3 syntax.
Guido van Rossum <guido@python.org>
parents:
37175
diff
changeset
|
26 names = sorted(os.listdir(dir)) |
|
b2d4e6fc4f19
Minimal changes to make byext.py script work with Python 3 syntax.
Guido van Rossum <guido@python.org>
parents:
37175
diff
changeset
|
27 except os.error as err: |
|
37175
a18aa3fbdd4a
SF bug #1457411, fix errors using variables that don't exist.
Neal Norwitz <nnorwitz@gmail.com>
parents:
28557
diff
changeset
|
28 sys.stderr.write("Can't list %s: %s\n" % (dir, err)) |
|
a18aa3fbdd4a
SF bug #1457411, fix errors using variables that don't exist.
Neal Norwitz <nnorwitz@gmail.com>
parents:
28557
diff
changeset
|
29 self.addstats("<dir>", "unlistable", 1) |
|
26999
8ed472e5bcd4
Silly little script to print statistics (files, lines, words) by
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
30 return |
|
8ed472e5bcd4
Silly little script to print statistics (files, lines, words) by
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
31 for name in names: |
|
28557
ba2d8921a8da
Various improvements to the way the table is formatted, to deal with
Guido van Rossum <guido@python.org>
parents:
26999
diff
changeset
|
32 if name.startswith(".#"): |
|
ba2d8921a8da
Various improvements to the way the table is formatted, to deal with
Guido van Rossum <guido@python.org>
parents:
26999
diff
changeset
|
33 continue # Skip CVS temp files |
|
ba2d8921a8da
Various improvements to the way the table is formatted, to deal with
Guido van Rossum <guido@python.org>
parents:
26999
diff
changeset
|
34 if name.endswith("~"): |
|
ba2d8921a8da
Various improvements to the way the table is formatted, to deal with
Guido van Rossum <guido@python.org>
parents:
26999
diff
changeset
|
35 continue# Skip Emacs backup files |
|
26999
8ed472e5bcd4
Silly little script to print statistics (files, lines, words) by
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
36 full = os.path.join(dir, name) |
|
8ed472e5bcd4
Silly little script to print statistics (files, lines, words) by
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
37 if os.path.islink(full): |
|
8ed472e5bcd4
Silly little script to print statistics (files, lines, words) by
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
38 self.addstats("<lnk>", "links", 1) |
|
8ed472e5bcd4
Silly little script to print statistics (files, lines, words) by
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
39 elif os.path.isdir(full): |
|
8ed472e5bcd4
Silly little script to print statistics (files, lines, words) by
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
40 self.statdir(full) |
|
8ed472e5bcd4
Silly little script to print statistics (files, lines, words) by
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
41 else: |
|
8ed472e5bcd4
Silly little script to print statistics (files, lines, words) by
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
42 self.statfile(full) |
|
8ed472e5bcd4
Silly little script to print statistics (files, lines, words) by
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
43 |
|
37175
a18aa3fbdd4a
SF bug #1457411, fix errors using variables that don't exist.
Neal Norwitz <nnorwitz@gmail.com>
parents:
28557
diff
changeset
|
44 def statfile(self, filename): |
|
a18aa3fbdd4a
SF bug #1457411, fix errors using variables that don't exist.
Neal Norwitz <nnorwitz@gmail.com>
parents:
28557
diff
changeset
|
45 head, ext = os.path.splitext(filename) |
|
a18aa3fbdd4a
SF bug #1457411, fix errors using variables that don't exist.
Neal Norwitz <nnorwitz@gmail.com>
parents:
28557
diff
changeset
|
46 head, base = os.path.split(filename) |
|
26999
8ed472e5bcd4
Silly little script to print statistics (files, lines, words) by
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
47 if ext == base: |
|
28557
ba2d8921a8da
Various improvements to the way the table is formatted, to deal with
Guido van Rossum <guido@python.org>
parents:
26999
diff
changeset
|
48 ext = "" # E.g. .cvsignore is deemed not to have an extension |
|
ba2d8921a8da
Various improvements to the way the table is formatted, to deal with
Guido van Rossum <guido@python.org>
parents:
26999
diff
changeset
|
49 ext = os.path.normcase(ext) |
|
ba2d8921a8da
Various improvements to the way the table is formatted, to deal with
Guido van Rossum <guido@python.org>
parents:
26999
diff
changeset
|
50 if not ext: |
|
ba2d8921a8da
Various improvements to the way the table is formatted, to deal with
Guido van Rossum <guido@python.org>
parents:
26999
diff
changeset
|
51 ext = "<none>" |
|
26999
8ed472e5bcd4
Silly little script to print statistics (files, lines, words) by
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
52 self.addstats(ext, "files", 1) |
|
8ed472e5bcd4
Silly little script to print statistics (files, lines, words) by
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
53 try: |
|
37175
a18aa3fbdd4a
SF bug #1457411, fix errors using variables that don't exist.
Neal Norwitz <nnorwitz@gmail.com>
parents:
28557
diff
changeset
|
54 f = open(filename, "rb") |
|
71038
b2d4e6fc4f19
Minimal changes to make byext.py script work with Python 3 syntax.
Guido van Rossum <guido@python.org>
parents:
37175
diff
changeset
|
55 except IOError as err: |
|
37175
a18aa3fbdd4a
SF bug #1457411, fix errors using variables that don't exist.
Neal Norwitz <nnorwitz@gmail.com>
parents:
28557
diff
changeset
|
56 sys.stderr.write("Can't open %s: %s\n" % (filename, err)) |
|
26999
8ed472e5bcd4
Silly little script to print statistics (files, lines, words) by
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
57 self.addstats(ext, "unopenable", 1) |
|
8ed472e5bcd4
Silly little script to print statistics (files, lines, words) by
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
58 return |
|
8ed472e5bcd4
Silly little script to print statistics (files, lines, words) by
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
59 data = f.read() |
|
8ed472e5bcd4
Silly little script to print statistics (files, lines, words) by
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
60 f.close() |
|
8ed472e5bcd4
Silly little script to print statistics (files, lines, words) by
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
61 self.addstats(ext, "bytes", len(data)) |
|
71038
b2d4e6fc4f19
Minimal changes to make byext.py script work with Python 3 syntax.
Guido van Rossum <guido@python.org>
parents:
37175
diff
changeset
|
62 if b'\0' in data: |
|
26999
8ed472e5bcd4
Silly little script to print statistics (files, lines, words) by
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
63 self.addstats(ext, "binary", 1) |
|
8ed472e5bcd4
Silly little script to print statistics (files, lines, words) by
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
64 return |
|
8ed472e5bcd4
Silly little script to print statistics (files, lines, words) by
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
65 if not data: |
|
8ed472e5bcd4
Silly little script to print statistics (files, lines, words) by
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
66 self.addstats(ext, "empty", 1) |
|
8ed472e5bcd4
Silly little script to print statistics (files, lines, words) by
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
67 #self.addstats(ext, "chars", len(data)) |
|
8ed472e5bcd4
Silly little script to print statistics (files, lines, words) by
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
68 lines = data.splitlines() |
|
8ed472e5bcd4
Silly little script to print statistics (files, lines, words) by
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
69 self.addstats(ext, "lines", len(lines)) |
|
8ed472e5bcd4
Silly little script to print statistics (files, lines, words) by
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
70 del lines |
|
8ed472e5bcd4
Silly little script to print statistics (files, lines, words) by
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
71 words = data.split() |
|
8ed472e5bcd4
Silly little script to print statistics (files, lines, words) by
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
72 self.addstats(ext, "words", len(words)) |
|
8ed472e5bcd4
Silly little script to print statistics (files, lines, words) by
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
73 |
|
8ed472e5bcd4
Silly little script to print statistics (files, lines, words) by
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
74 def addstats(self, ext, key, n): |
|
8ed472e5bcd4
Silly little script to print statistics (files, lines, words) by
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
75 d = self.stats.setdefault(ext, {}) |
|
8ed472e5bcd4
Silly little script to print statistics (files, lines, words) by
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
76 d[key] = d.get(key, 0) + n |
|
8ed472e5bcd4
Silly little script to print statistics (files, lines, words) by
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
77 |
|
8ed472e5bcd4
Silly little script to print statistics (files, lines, words) by
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
78 def report(self): |
|
71038
b2d4e6fc4f19
Minimal changes to make byext.py script work with Python 3 syntax.
Guido van Rossum <guido@python.org>
parents:
37175
diff
changeset
|
79 exts = sorted(self.stats.keys()) |
|
26999
8ed472e5bcd4
Silly little script to print statistics (files, lines, words) by
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
80 # Get the column keys |
|
8ed472e5bcd4
Silly little script to print statistics (files, lines, words) by
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
81 columns = {} |
|
8ed472e5bcd4
Silly little script to print statistics (files, lines, words) by
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
82 for ext in exts: |
|
8ed472e5bcd4
Silly little script to print statistics (files, lines, words) by
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
83 columns.update(self.stats[ext]) |
|
71038
b2d4e6fc4f19
Minimal changes to make byext.py script work with Python 3 syntax.
Guido van Rossum <guido@python.org>
parents:
37175
diff
changeset
|
84 cols = sorted(columns.keys()) |
|
28557
ba2d8921a8da
Various improvements to the way the table is formatted, to deal with
Guido van Rossum <guido@python.org>
parents:
26999
diff
changeset
|
85 colwidth = {} |
|
ba2d8921a8da
Various improvements to the way the table is formatted, to deal with
Guido van Rossum <guido@python.org>
parents:
26999
diff
changeset
|
86 colwidth["ext"] = max([len(ext) for ext in exts]) |
|
ba2d8921a8da
Various improvements to the way the table is formatted, to deal with
Guido van Rossum <guido@python.org>
parents:
26999
diff
changeset
|
87 minwidth = 6 |
|
ba2d8921a8da
Various improvements to the way the table is formatted, to deal with
Guido van Rossum <guido@python.org>
parents:
26999
diff
changeset
|
88 self.stats["TOTAL"] = {} |
|
26999
8ed472e5bcd4
Silly little script to print statistics (files, lines, words) by
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
89 for col in cols: |
|
28557
ba2d8921a8da
Various improvements to the way the table is formatted, to deal with
Guido van Rossum <guido@python.org>
parents:
26999
diff
changeset
|
90 total = 0 |
|
ba2d8921a8da
Various improvements to the way the table is formatted, to deal with
Guido van Rossum <guido@python.org>
parents:
26999
diff
changeset
|
91 cw = max(minwidth, len(col)) |
|
ba2d8921a8da
Various improvements to the way the table is formatted, to deal with
Guido van Rossum <guido@python.org>
parents:
26999
diff
changeset
|
92 for ext in exts: |
|
26999
8ed472e5bcd4
Silly little script to print statistics (files, lines, words) by
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
93 value = self.stats[ext].get(col) |
|
8ed472e5bcd4
Silly little script to print statistics (files, lines, words) by
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
94 if value is None: |
|
28557
ba2d8921a8da
Various improvements to the way the table is formatted, to deal with
Guido van Rossum <guido@python.org>
parents:
26999
diff
changeset
|
95 w = 0 |
|
26999
8ed472e5bcd4
Silly little script to print statistics (files, lines, words) by
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
96 else: |
|
28557
ba2d8921a8da
Various improvements to the way the table is formatted, to deal with
Guido van Rossum <guido@python.org>
parents:
26999
diff
changeset
|
97 w = len("%d" % value) |
|
ba2d8921a8da
Various improvements to the way the table is formatted, to deal with
Guido van Rossum <guido@python.org>
parents:
26999
diff
changeset
|
98 total += value |
|
ba2d8921a8da
Various improvements to the way the table is formatted, to deal with
Guido van Rossum <guido@python.org>
parents:
26999
diff
changeset
|
99 cw = max(cw, w) |
|
ba2d8921a8da
Various improvements to the way the table is formatted, to deal with
Guido van Rossum <guido@python.org>
parents:
26999
diff
changeset
|
100 cw = max(cw, len(str(total))) |
|
ba2d8921a8da
Various improvements to the way the table is formatted, to deal with
Guido van Rossum <guido@python.org>
parents:
26999
diff
changeset
|
101 colwidth[col] = cw |
|
ba2d8921a8da
Various improvements to the way the table is formatted, to deal with
Guido van Rossum <guido@python.org>
parents:
26999
diff
changeset
|
102 self.stats["TOTAL"][col] = total |
|
ba2d8921a8da
Various improvements to the way the table is formatted, to deal with
Guido van Rossum <guido@python.org>
parents:
26999
diff
changeset
|
103 exts.append("TOTAL") |
|
ba2d8921a8da
Various improvements to the way the table is formatted, to deal with
Guido van Rossum <guido@python.org>
parents:
26999
diff
changeset
|
104 for ext in exts: |
|
ba2d8921a8da
Various improvements to the way the table is formatted, to deal with
Guido van Rossum <guido@python.org>
parents:
26999
diff
changeset
|
105 self.stats[ext]["ext"] = ext |
|
ba2d8921a8da
Various improvements to the way the table is formatted, to deal with
Guido van Rossum <guido@python.org>
parents:
26999
diff
changeset
|
106 cols.insert(0, "ext") |
|
ba2d8921a8da
Various improvements to the way the table is formatted, to deal with
Guido van Rossum <guido@python.org>
parents:
26999
diff
changeset
|
107 def printheader(): |
|
ba2d8921a8da
Various improvements to the way the table is formatted, to deal with
Guido van Rossum <guido@python.org>
parents:
26999
diff
changeset
|
108 for col in cols: |
|
71038
b2d4e6fc4f19
Minimal changes to make byext.py script work with Python 3 syntax.
Guido van Rossum <guido@python.org>
parents:
37175
diff
changeset
|
109 print("%*s" % (colwidth[col], col), end=" ") |
|
b2d4e6fc4f19
Minimal changes to make byext.py script work with Python 3 syntax.
Guido van Rossum <guido@python.org>
parents:
37175
diff
changeset
|
110 print() |
|
28557
ba2d8921a8da
Various improvements to the way the table is formatted, to deal with
Guido van Rossum <guido@python.org>
parents:
26999
diff
changeset
|
111 printheader() |
|
ba2d8921a8da
Various improvements to the way the table is formatted, to deal with
Guido van Rossum <guido@python.org>
parents:
26999
diff
changeset
|
112 for ext in exts: |
|
ba2d8921a8da
Various improvements to the way the table is formatted, to deal with
Guido van Rossum <guido@python.org>
parents:
26999
diff
changeset
|
113 for col in cols: |
|
ba2d8921a8da
Various improvements to the way the table is formatted, to deal with
Guido van Rossum <guido@python.org>
parents:
26999
diff
changeset
|
114 value = self.stats[ext].get(col, "") |
|
71038
b2d4e6fc4f19
Minimal changes to make byext.py script work with Python 3 syntax.
Guido van Rossum <guido@python.org>
parents:
37175
diff
changeset
|
115 print("%*s" % (colwidth[col], value), end=" ") |
|
b2d4e6fc4f19
Minimal changes to make byext.py script work with Python 3 syntax.
Guido van Rossum <guido@python.org>
parents:
37175
diff
changeset
|
116 print() |
|
28557
ba2d8921a8da
Various improvements to the way the table is formatted, to deal with
Guido van Rossum <guido@python.org>
parents:
26999
diff
changeset
|
117 printheader() # Another header at the bottom |
|
26999
8ed472e5bcd4
Silly little script to print statistics (files, lines, words) by
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
118 |
|
8ed472e5bcd4
Silly little script to print statistics (files, lines, words) by
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
119 def main(): |
|
8ed472e5bcd4
Silly little script to print statistics (files, lines, words) by
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
120 args = sys.argv[1:] |
|
8ed472e5bcd4
Silly little script to print statistics (files, lines, words) by
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
121 if not args: |
|
8ed472e5bcd4
Silly little script to print statistics (files, lines, words) by
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
122 args = [os.curdir] |
|
8ed472e5bcd4
Silly little script to print statistics (files, lines, words) by
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
123 s = Stats() |
|
8ed472e5bcd4
Silly little script to print statistics (files, lines, words) by
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
124 s.statargs(args) |
|
8ed472e5bcd4
Silly little script to print statistics (files, lines, words) by
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
125 s.report() |
|
8ed472e5bcd4
Silly little script to print statistics (files, lines, words) by
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
126 |
|
8ed472e5bcd4
Silly little script to print statistics (files, lines, words) by
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
127 if __name__ == "__main__": |
|
8ed472e5bcd4
Silly little script to print statistics (files, lines, words) by
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
128 main() |
