MCPcopy
hub / github.com/Pylons/pyramid / package_of

Function package_of

src/pyramid/path.py:49–53  ·  view source on GitHub ↗

Return the package of a module or return the package itself

(pkg_or_module)

Source from the content-addressed store, hash-verified

47
48
49def package_of(pkg_or_module):
50 """Return the package of a module or return the package itself"""
51 pkg_name = package_name(pkg_or_module)
52 __import__(pkg_name)
53 return sys.modules[pkg_name]
54
55
56def caller_package(level=2, caller_module=caller_module):

Callers 3

includeMethod · 0.90
_callFUTMethod · 0.90
__init__Method · 0.85

Calls 1

package_nameFunction · 0.85

Tested by 1

_callFUTMethod · 0.72

Used in the wild real call sites across dependent graphs

searching dependent graphs…