]>
git.saurik.com Git - wxWidgets.git/blob - wxPython/distrib/mac/zappycfiles.py
1 #!/usr/local/bin/python
2 """Recursively zap all .pyc and .pyo files"""
6 # set doit true to actually delete files
7 # set doit false to just print what would be deleted
14 dir = EasyDialogs
.AskFolder(message
='Directory to zap pyc files in')
19 print 'Usage: zappyc dir ...'
21 for dir in sys
.argv
[1:]:
25 os
.path
.walk(dir, walker
, None)
27 def walker(dummy
, top
, names
):
29 if name
[-4:] in ('.pyc', '.pyo'):
30 path
= os
.path
.join(top
, name
)
35 if __name__
== '__main__':