arte/utils/locate.py
def locate_first(pattern, rootdir=None):
    '''Locate the first filename matching *pattern*

    Locate the first file a matching, 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.

    Returns
    -------
    string
        the first filename matching *pattern*, or None if not found.
    '''
    loc = locate(pattern, rootdir)
    try:
        return next(loc)
    except StopIteration:
        return None
Locate the first filename matching *pattern*

    Locate the first file a matching, 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.

    Returns
    -------
    string
        the first filename matching *pattern*, or None if not found.
    
Locate the first filename matching *pattern
Locate the first file a matching, 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.

Returns

string
the first filename matching *pattern*, or None if not found.
Locate the first filename matching * pattern Locate the first file a matching 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 . Returns string the first filename matching * pattern * or None if not found .
def locate_first(pattern, rootdir=None):
    loc = locate(pattern, rootdir)
    try:
        return next(loc)
    except StopIteration:
        return None
def locate_first ( pattern , rootdir = None ) : loc = locate ( pattern , rootdir ) try : return next ( loc ) except StopIteration : return None
Locate the first filename matching *pattern
Locate the first file a matching, inside and below the root directory.
Locate the first filename matching * pattern Locate the first file a matching inside and below the root directory .
'''Locate the first filename matching *pattern*

    Locate the first file a matching, 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.

    Returns
    -------
    string
        the first filename matching *pattern*, or None if not found.
    '''
pattern
rootdir