bionic787
12/24/2013 - 6:28 AM

http://stackoverflow.com/questions/2186525/use-a-glob-to-find-files-recursively-in-python?lq=1

import fnmatch
import os

matches = []
for root, dirnames, filenames in os.walk('src'):
  for filename in fnmatch.filter(filenames, '*.c'):
      matches.append(os.path.join(root, filename))