(libnames, path=None)
return results
.
.
.
def _findlib(libnames, path=None):
    """."""
    platform = sys.platform
    if platform in ("win32",):
        pattern = "%s.dll"
    elif platform == "darwin":
        pattern = "lib%s.dylib"
    else:
        pattern = "lib%s.so"
    searchfor = libnames
    if type(libnames) is dict:
        # different library names for the platforms
        if platform not in libnames:
            platform = "DEFAULT"
        searchfor = libnames[platform]
    results = []
    if path:
        for libname in searchfor:
            for subpath in str.split(path, os.pathsep):
                dllfile = os.path.join(subpath, pattern % libname)
                if os.path.exists(dllfile):
                    results.append(dllfile)
    for libname in searchfor:
        dllfile = find_library(libname)
        if dllfile:
            results.append(dllfile)
    return results
def _findlib ( libnames , path = None ) : platform = sys . platform if platform in ( "win32" , ) : pattern = "%s.dll" elif platform == "darwin" : pattern = "lib%s.dylib" else : pattern = "lib%s.so" searchfor = libnames if type ( libnames ) is dict : # different library names for the platforms if platform not in libnames : platform = "DEFAULT" searchfor = libnames [ platform ] results = [ ] if path : for libname in searchfor : for subpath in str . split ( path , os . pathsep ) : dllfile = os . path . join ( subpath , pattern % libname ) if os . path . exists ( dllfile ) : results . append ( dllfile ) for libname in searchfor : dllfile = find_library ( libname ) if dllfile : results . append ( dllfile ) return results