1 # Remove all the .pyc and .pyo files under ../Lib.
6 from os
.path
import join
9 for root
, dirs
, files
in os
.walk(root
):
12 if name
.endswith('.pyc'):
15 elif name
.endswith('.pyo'):
20 os
.remove(join(root
, name
))
24 npyc
, npyo
= deltree("../../Lib")
25 print(npyc
, ".pyc deleted,", npyo
, ".pyo deleted")