MCPcopy Index your code
hub / github.com/python/cpython / module_search_paths

Method module_search_paths

Lib/test/test_embed.py:1427–1444  ·  view source on GitHub ↗
(self, prefix=None, exec_prefix=None)

Source from the content-addressed store, hash-verified

1425 api=API_PYTHON, env=env, ignore_stderr=True)
1426
1427 def module_search_paths(self, prefix=None, exec_prefix=None):
1428 config = self._get_expected_config()
1429 if prefix is None:
1430 prefix = config['config']['prefix']
1431 if exec_prefix is None:
1432 exec_prefix = config['config']['prefix']
1433 if MS_WINDOWS:
1434 return config['config']['module_search_paths']
1435 else:
1436 ver = sys.version_info
1437 return [
1438 os.path.join(prefix, sys.platlibdir,
1439 f'python{ver.major}{ver.minor}{ABI_THREAD}.zip'),
1440 os.path.join(prefix, sys.platlibdir,
1441 f'python{ver.major}.{ver.minor}{ABI_THREAD}'),
1442 os.path.join(exec_prefix, sys.platlibdir,
1443 f'python{ver.major}.{ver.minor}{ABI_THREAD}', 'lib-dynload'),
1444 ]
1445
1446 @contextlib.contextmanager
1447 def tmpdir_with_python(self, subdir=None):

Calls 2

_get_expected_configMethod · 0.95
joinMethod · 0.45

Tested by

no test coverage detected