lifecycle.py 文件源码

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

项目:rlipython 作者: ipython 项目源码 文件源码
def get_config():
    ip = get_ipython()

    if ip is None:
        profile_dir = paths.locate_profile()
    else:
        profile_dir = ip.profile_dir.location

    json_path = path.join(profile_dir, "ipython_config.json")

    try:
        with open(json_path, 'r') as f:
            config = json.load(f)
    except (FileNotFoundError, json.decoder.JSONDecodeError):
        config = {}
    return config, json_path
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号