def locate(pattern, root=os.curdir):
for path, dirs, files in os.walk(os.path.abspath(root)):<EOL><INDENT>for filename in fnmatch.filter(files, pattern):<EOL><INDENT>yield os.path.join(path, filename)<EOL><DEDENT><DEDENT>
Locate all files matching supplied filename pattern in and below
    supplied root directory.