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

Function addsitepackages

Lib/site.py:421–428  ·  view source on GitHub ↗

Add site-packages to sys.path

(known_paths, prefixes=None)

Source from the content-addressed store, hash-verified

419 return sitepackages
420
421def addsitepackages(known_paths, prefixes=None):
422 """Add site-packages to sys.path"""
423 _trace("Processing global site-packages")
424 for sitedir in getsitepackages(prefixes):
425 if os.path.isdir(sitedir):
426 addsitedir(sitedir, known_paths)
427
428 return known_paths
429
430def setquit():
431 """Define new builtins 'quit' and 'exit'.

Callers 2

venvFunction · 0.85
mainFunction · 0.85

Calls 4

_traceFunction · 0.85
getsitepackagesFunction · 0.85
addsitedirFunction · 0.85
isdirMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…