Lines Matching refs:ext
47 head, ext = os.path.splitext(filename)
49 if ext == base:
50 ext = "" # E.g. .cvsignore is deemed not to have an extension
51 ext = os.path.normcase(ext)
52 if not ext:
53 ext = "<none>"
54 self.addstats(ext, "files", 1)
59 self.addstats(ext, "unopenable", 1)
63 self.addstats(ext, "bytes", len(data))
65 self.addstats(ext, "binary", 1)
68 self.addstats(ext, "empty", 1)
71 self.addstats(ext, "lines", len(lines))
74 self.addstats(ext, "words", len(words))
76 def addstats(self, ext, key, n): argument
77 d = self.stats.setdefault(ext, {})
84 for ext in exts:
85 columns.update(self.stats[ext])
88 colwidth["ext"] = max([len(ext) for ext in exts])
94 for ext in exts:
95 value = self.stats[ext].get(col)
106 for ext in exts:
107 self.stats[ext]["ext"] = ext
114 for ext in exts:
116 value = self.stats[ext].get(col, "")