__init__.py 文件源码

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

项目:pipless 作者: d0c-s4vage 项目源码 文件源码
def _find_module_path(module_name, mod_path=None):
    """Recursively find the module path. ImportError will
    be raised if the module cannot be found.
    """
    parts = module_name.split(".")

    find_args = [parts[0]]
    if mod_path is not None:
        find_args.append([mod_path])

    file_,mod_path,desc = imp.find_module(*find_args)

    if len(parts) > 1:
        return _find_module_path(".".join(parts[1:]), mod_path)

    return mod_path
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号