Staging
v0.8.1
v0.8.1
Revision b94d7396b6b313b3dcd17880427a2e9cd95cf27d authored by Miss Islington (bot) on 27 April 2018, 22:57:59 UTC, committed by GitHub on 27 April 2018, 22:57:59 UTC
The wording here seems wrong, as per https://bugs.python.org/msg315792 (cherry picked from commit e022bbc169ca1428dc3017187012de17ce6e0bc7) Co-authored-by: Tom Christie <tom@tomchristie.com>
1 parent a93a663
rmpyc.py
# Remove all the .pyc files under ../Lib.
def deltree(root):
import os
from os.path import join
npyc = 0
for root, dirs, files in os.walk(root):
for name in files:
# to be thorough
if name.endswith(('.pyc', '.pyo')):
npyc += 1
os.remove(join(root, name))
return npyc
npyc = deltree("../Lib")
print(npyc, ".pyc deleted")
Computing file changes ...