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

Function pkg_info

IPython/utils/sysinfo.py:70–95  ·  view source on GitHub ↗

Return dict describing the context of this package Parameters ---------- pkg_path : str path containing __init__.py for package Returns ------- context : dict with named parameters of interest

(pkg_path: str)

Source from the content-addressed store, hash-verified

68
69
70def pkg_info(pkg_path: str) -> dict:
71 """Return dict describing the context of this package
72
73 Parameters
74 ----------
75 pkg_path : str
76 path containing __init__.py for package
77
78 Returns
79 -------
80 context : dict
81 with named parameters of interest
82 """
83 src, hsh = pkg_commit_hash(pkg_path)
84 return dict(
85 ipython_version=release.version,
86 ipython_path=pkg_path,
87 commit_source=src,
88 commit_hash=hsh,
89 sys_version=sys.version,
90 sys_executable=sys.executable,
91 sys_platform=sys.platform,
92 platform=platform.platform(),
93 os_name=os.name,
94 default_encoding=encoding.DEFAULT_ENCODING,
95 )
96
97def get_sys_info() -> dict:
98 """Return useful information about IPython and the system, as a dict."""

Callers 1

get_sys_infoFunction · 0.85

Calls 1

pkg_commit_hashFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…