arte/utils/locate.py
def locate(pattern, rootdir=None):
    '''Generator similar to Unix's *locate* utility

    Locates all files matching a pattern, inside and below the root directory.
    If no root directory is given, the current directory is used instead.

    Parameters
    ----------
    pattern: string
        the filename pattern to match. Unix wildcards are allowed
    rootdir: string, optional
        the root directory where the search is started. If not set,
        the current directory is used.

    Yields
    ------
    string
        the next filename matching *pattern*

    '''
    if rootdir is None:
        rootdir = os.curdir

    for path, dirs, files in os.walk(rootdir):
        for filename in fnmatch.filter(files, pattern):
            yield os.path.join(path, filename)
Generator similar to Unix's *locate* utility

    Locates all files matching a pattern, inside and below the root directory.
    If no root directory is given, the current directory is used instead.

    Parameters
    ----------
    pattern: string
        the filename pattern to match. Unix wildcards are allowed
    rootdir: string, optional
        the root directory where the search is started. If not set,
        the current directory is used.

    Yields
    ------
    string
        the next filename matching *pattern*

    
Generator similar to Unix's *locate* utility
Locates all files matching a pattern, inside and below the root directory.
If no root directory is given, the current directory is used instead.

Parameters

string
the filename pattern to match. Unix wildcards are allowed
rootdir: string, optional
the root directory where the search is started. If not set,
the current directory is used.

Yields

string
the next filename matching *pattern
Generator similar to Unix ' s * locate * utility Locates all files matching a pattern inside and below the root directory . If no root directory is given the current directory is used instead . Parameters string the filename pattern to match . Unix wildcards are allowed rootdir : string optional the root directory where the search is started . If not set the current directory is used . Yields string the next filename matching * pattern
def locate(pattern, rootdir=None):
    if rootdir is None:
        rootdir = os.curdir
    for path, dirs, files in os.walk(rootdir):
        for filename in fnmatch.filter(files, pattern):
            yield os.path.join(path, filename)
def locate ( pattern , rootdir = None ) : if rootdir is None : rootdir = os . curdir for path , dirs , files in os . walk ( rootdir ) : for filename in fnmatch . filter ( files , pattern ) : yield os . path . join ( path , filename )
Generator similar to Unix's *locate* utility
Locates all files matching a pattern, inside and below the root directory.
Generator similar to Unix ' s * locate * utility Locates all files matching a pattern inside and below the root directory .
'''Generator similar to Unix's *locate* utility

    Locates all files matching a pattern, inside and below the root directory.
    If no root directory is given, the current directory is used instead.

    Parameters
    ----------
    pattern: string
        the filename pattern to match. Unix wildcards are allowed
    rootdir: string, optional
        the root directory where the search is started. If not set,
        the current directory is used.

    Yields
    ------
    string
        the next filename matching *pattern*

    '''
pattern
rootdir