def find_files(directory, pattern):
for root, __, files in os.walk(directory):<EOL><INDENT>for basename in files:<EOL><INDENT>if fnmatch.fnmatch(basename, pattern):<EOL><INDENT>filename = os.path.join(root, basename)<EOL>yield filename<EOL><DEDENT><DEDENT><DEDENT>
Recusively finds files in a directory re
:param directory: base directory
:param pattern: wildcard pattern
:return: generator with filenames matching pattern