root/trunk/RuneBlade/clean.py

Revision 486, 328 bytes (checked in by sholloway, 6 years ago)

*** empty log message ***

Line 
1 from path import path
2
3 removeitems = ('*.pyc', '*.pyo', '*.swp', '*.log', '*.aux', '*.out', '*.bak')
4
5 count = 0
6 local = path('.')
7 for item in removeitems:
8     for pyc in local.walk(item):
9         try:
10             pyc.remove()
11             count += 1
12         except OSError:
13             pass
14
15 print "Removed %d files" % (count,)
Note: See TracBrowser for help on using the browser.