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
评论列表
文章目录