infra.py 文件源码

python
阅读 19 收藏 0 点赞 0 评论 0

项目:localstack 作者: atlassian 项目源码 文件源码
def load_plugins():
    loaded_files = []
    for module in pkgutil.iter_modules():
        if six.PY3 and not isinstance(module, tuple):
            file_path = '%s/%s/plugins.py' % (module.module_finder.path, module.name)
            if file_path not in loaded_files:
                load_plugin_from_path(file_path)
                loaded_files.append(file_path)
        elif six.PY3 or isinstance(module[0], pkgutil.ImpImporter):
            file_path = '%s/%s/plugins.py' % (module[0].path, module[1])
            if file_path not in loaded_files:
                load_plugin_from_path(file_path)
                loaded_files.append(file_path)


# -----------------
# API ENTRY POINTS
# -----------------
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号