python_plugin.py 文件源码

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

项目:OpenTimelineIO 作者: PixarAnimationStudios 项目源码 文件源码
def _imported_module(self):
        """Load the module this adapter points at."""

        pyname = os.path.splitext(os.path.basename(self.module_abs_path()))[0]
        pydir = os.path.dirname(self.module_abs_path())

        (file_obj, pathname, description) = imp.find_module(pyname, [pydir])

        with file_obj:
            # this will reload the module if it has already been loaded.
            mod = imp.load_module(
                "opentimelineio.adapters.{}".format(self.name),
                file_obj,
                pathname,
                description
            )

            return mod
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号