def Walk(root='<STR_LIT:.>', recurse=True, pattern='<STR_LIT:*>'):
for path, subdirs, files in os.walk(root):<EOL><INDENT>for name in files:<EOL><INDENT>if fnmatch.fnmatch(name, pattern):<EOL><INDENT>yield os.path.join(path, name)<EOL><DEDENT><DEDENT>if not recurse:<EOL><INDENT>break<EOL><DEDENT><DEDENT>
Generator for walking a directory tree.
Starts at specified root folder, returning files that match our pattern. 
Optionally will also recurse through sub-folders.

Parameters
----------
root : string (default is *'.'*)
    Path for the root folder to look in.
recurse : bool (default is *True*)
    If *True*, will also look in the subfolders.
pattern : string (default is :emphasis:`'*'`, which means all the files are concerned)
    The pattern to look for in the files' name.

Returns
-------
generator
    **Walk** yields a generator from the matching files paths.