Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(2)  |  Call(1)  |  Derive(0)  |  Import(1)

        def get_providers():
    path = os.path.relpath(os.path.dirname(__file__))

    files = glob.glob(os.path.join(path,'[!_]*.py'))
    modules = dict(_load(path) for path in files)
    providers = []
    for name, module in modules.items():
        func = None
        try:
            func = getattr(module, 'lookup')
        except AttributeError:
            continue
        providers.append((name, func))

    return providers