def _recursive_search(path, pattern):
 filtered_files = list()
 for (dirpath, dirnames, files) in os.walk(path):
  for f in fnmatch.filter(files, pattern):
   if f.endswith(tuple(VALID_EXTENSIONS)):
    filtered_files.append(op.realpath(op.join(dirpath, f)))
 return filtered_files

def _recursive_search ( path , pattern ) : filtered_files = list ( ) for ( dirpath , dirnames , files ) in os . walk ( path ) : for f in fnmatch . filter ( files , pattern ) : if f . endswith ( tuple ( VALID_EXTENSIONS ) ) : filtered_files . append ( op . realpath ( op . join ( dirpath , f ) ) ) return filtered_files
auxiliary function for recursive_search of the directory .