sphinx_compat.py 文件源码

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

项目:revitpythonwrapper 作者: gtalarico 项目源码 文件源码
def load_module(self, fullname):
        """This method is called by Python if CustomImporter.find_module
           does not return None. fullname is the fully-qualified name
           of the module/package that was requested."""
        if fullname in sys.modules:
            return sys.modules[fullname]
        else:
            logger.debug('Importing Mock Module: {}'.format(fullname))
            # mod = imp.new_module(fullname)
            # import pdb; pdb.set_trace()
            mod = MockObject(fullname=fullname)
            mod.__loader__ = self
            mod.__file__ = fullname
            mod.__path__ = [fullname]
            mod.__name__ = fullname
            sys.modules[fullname] = mod
            return mod  # This gives errors
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号