]>
Commit | Line | Data |
---|---|---|
01a3d0e1 CP |
1 | #!/usr/bin/env python |
2 | import os | |
3 | ||
4 | def tryunlink(*args): | |
5 | fn = os.path.join(*args) | |
6 | if os.path.exists(fn): | |
7 | os.unlink(fn) | |
8 | ||
9 | def main(): | |
10 | for root, dirs, files in os.walk("."): | |
ed6e8651 CP |
11 | if ".git" in dirs: |
12 | dirs.remove(".git") | |
01a3d0e1 CP |
13 | for x in files: |
14 | if os.path.splitext(x)[-1] == ".pyc": | |
15 | tryunlink(root, x) | |
16 | ||
17 | if __name__ == "__main__": | |
ed6e8651 | 18 | main() |