MCPcopy Create free account
hub / github.com/ipython/ipython / get_ipython_cache_dir

Function get_ipython_cache_dir

IPython/paths.py:73–84  ·  view source on GitHub ↗

Get the cache directory it is created if it does not exist.

()

Source from the content-addressed store, hash-verified

71
72
73def get_ipython_cache_dir() -> str:
74 """Get the cache directory it is created if it does not exist."""
75 xdgdir = get_xdg_cache_dir()
76 if xdgdir is None:
77 return get_ipython_dir()
78 ipdir = os.path.join(xdgdir, "ipython")
79 if not os.path.exists(ipdir) and _writable_dir(xdgdir):
80 ensure_dir_exists(ipdir)
81 elif not _writable_dir(xdgdir):
82 return get_ipython_dir()
83
84 return ipdir
85
86
87def get_ipython_package_dir() -> str:

Callers 1

get_ipython_cache_dirFunction · 0.90

Calls 4

get_xdg_cache_dirFunction · 0.90
_writable_dirFunction · 0.90
ensure_dir_existsFunction · 0.90
get_ipython_dirFunction · 0.70

Tested by

no test coverage detected