MCPcopy Index your code
hub / github.com/ipython/ipython / get_ipython_cache_dir

Function get_ipython_cache_dir

IPython/paths.py:75–86  ·  view source on GitHub ↗

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

()

Source from the content-addressed store, hash-verified

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

Callers

nothing calls this directly

Calls 4

get_xdg_cache_dirFunction · 0.90
_writable_dirFunction · 0.90
ensure_dir_existsFunction · 0.90
get_ipython_dirFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…