mirror of https://github.com/python/cpython.git
Remove .pyo files too.
This commit is contained in:
parent
a6db44f169
commit
3337ea731b
|
@ -1,5 +1,5 @@
|
||||||
#!/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):
|
||||||
|
|
||||||
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:
|
||||||
|
|
Loading…
Reference in New Issue