Skip to content

Instantly share code, notes, and snippets.

#!/usr/bin/env python
"""Count imports in *.py files in a given directory recursively.
Each name is counted once per file.
"""
import ast
import os
import sys
from collections import Counter