This is what I have:
glob(os.path.join(\'src\',\'*.c\'))
but I want to search the subfolders of src. Something like this would work:
You'll want to use os.walk to collect filenames that match your criteria. For example:
os.walk
import os cfiles = [] for root, dirs, files in os.walk('src'): for file in files: if file.endswith('.c'): cfiles.append(os.path.join(root, file))