root/cleanup
| Revision 413:0e11c68a2cd8, 267 bytes (checked in by paniq, 5 months ago) | |
|---|---|
|
|
| Line | |
|---|---|
| 1 | #!/usr/bin/env python |
| 2 | |
| 3 | CLEAN = [ |
| 4 | '*.pyc', |
| 5 | ] |
| 6 | |
| 7 | import os,glob |
| 8 | for base,folders,filenames in os.walk('.'): |
| 9 | if '.svn' in base: |
| 10 | continue |
| 11 | for ext in CLEAN: |
| 12 | for filename in glob.glob(os.path.join(base, ext)): |
| 13 | print "removing "+filename+"..." |
| 14 | os.remove(filename) |
Note: See TracBrowser
for help on using the browser.
