flush_compiler_caches.py 265 B

12345678
  1. import os, re, os.path
  2. pattern = "^.*\.pickle$"
  3. mypath = "."
  4. for root, dirs, files in os.walk(mypath):
  5. for file in filter(lambda x: re.match(pattern, x), files):
  6. print("Remove: %s" % os.path.join(root, file))
  7. os.remove(os.path.join(root, file))