Slide 86
Slide 86 text
Example
def filetypes(topdir):
from collections import Counter
from pprint import pprint
c = Counter(os.path.splitext(name)[1]
for _, name in allfiles(topdir))
pprint(c.most_common())
>>> filetypes('AllPython')
[('.py', 125277),
('.c', 27200),
('', 17010),
('.rst', 15439),
('.h', 14782),
('.tex', 12257),
...
allfiles()