managers.py 文件源码

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

项目:spoonybard 作者: notnownikki 项目源码 文件源码
def load(self, name, force_reload_if_unmanaged=False):
        if name in sys.modules and name not in self.plugins:
            # we're getting an already loaded module, which we has not been
            # loaded through PluginManager, return it from sys.modules and
            # add it to our list
            module = sys.modules[name]
            if force_reload_if_unmanaged:
                importlib.reload(module)
        else:
            module = importlib.import_module(name)
        self.plugins.add(name)
        return module
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号