DeferredImportCallbackFinder

(类来自 pyomo.common.dependencies)

class pyomo.common.dependencies.DeferredImportCallbackFinder[source]

基础类:object

自定义查找器,将包装普通加载器以触发回调

这个 importlib.abc.MetaPathFinder 查找器将包装由 PathFinder 返回的普通加载器,该加载器将在模块加载后触发自定义回调。我们使用这个功能来触发通过 attempt_import() 注册的导入后回调,即使用户直接导入目标库(而不是通过 DeferredImportModule 的属性访问)。

__init__()

方法

__init__()

find_spec(fullname, path[, target])

invalidate_caches()

成员文档