Commit 3337ea73 authored by Jack Jansen's avatar Jack Jansen

Remove .pyo files too.

parent a6db44f1
#!/usr/local/bin/python #!/usr/local/bin/python
"""Recursively zap all .pyc files""" """Recursively zap all .pyc and .pyo files"""
import os import os
import sys import sys
...@@ -27,7 +27,7 @@ def zappyc(dir): ...@@ -27,7 +27,7 @@ def zappyc(dir):
def walker(dummy, top, names): def walker(dummy, top, names):
for name in names: for name in names:
if name[-4:] == '.pyc': if name[-4:] in ('.pyc', '.pyo'):
path = os.path.join(top, name) path = os.path.join(top, name)
print 'Zapping', path print 'Zapping', path
if doit: if doit:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment