MCPcopy Create free account
hub / github.com/catboost/catboost / get_module_path

Method get_module_path

library/python/runtime_py3/__res.py:567–577  ·  view source on GitHub ↗

Find file path for module 'fullname'. For packages caller pass fullname as 'package.__init__'. Return None if nothing is found.

(self, fullname)

Source from the content-addressed store, hash-verified

565 self._add_parent_dirs(package_name, visited=set())
566
567 def get_module_path(self, fullname):
568 """
569 Find file path for module 'fullname'.
570 For packages caller pass fullname as 'package.__init__'.
571 Return None if nothing is found.
572 """
573 try:
574 if not self.is_package(fullname):
575 return _b(self._cache_module_path(fullname))
576 except ImportError:
577 pass
578
579 def is_package(self, fullname):
580 """Check if fullname is a package. Raise ImportError if fullname is not found"""

Calls 2

is_packageMethod · 0.95
_cache_module_pathMethod · 0.95