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

Function pkg_info

IPython/utils/sysinfo.py:68–93  ·  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)

Source from the content-addressed store, hash-verified

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