def search(cls, name, lookup=None):
        """ Search name in all directories specified in lookup.
        First without, then with common extensions. Return first hit. """

        for spath in lookup:
            spath = os.path.abspath(spath) + os.sep
            fname = os.path.abspath(os.path.join(spath, name))
            if not fname.startswith(spath): continue
            if os.path.isfile(fname): return fname
            for ext in cls.extensions:
                if os.path.isfile('%s.%s' % (fname, ext)):
                    return '%s.%s' % (fname, ext)
def search ( cls , name , lookup = None ) : for spath in lookup : spath = os . path . abspath ( spath ) + os . sep fname = os . path . abspath ( os . path . join ( spath , name ) ) if not fname . startswith ( spath ) : continue if os . path . isfile ( fname ) : return fname for ext in cls . extensions : if os . path . isfile ( '%s.%s' % ( fname , ext ) ) : return '%s.%s' % ( fname , ext )
Search name in all directories specified in lookup.
        First without, then with common extensions. Return first hit.