MCPcopy Index your code
hub / github.com/RustPython/RustPython / addsitepackages

Function addsitepackages

Lib/site.py:424–431  ·  view source on GitHub ↗

Add site-packages to sys.path

(known_paths, prefixes=None)

Source from the content-addressed store, hash-verified

422 return sitepackages
423
424def addsitepackages(known_paths, prefixes=None):
425 """Add site-packages to sys.path"""
426 _trace("Processing global site-packages")
427 for sitedir in getsitepackages(prefixes):
428 if os.path.isdir(sitedir):
429 addsitedir(sitedir, known_paths)
430
431 return known_paths
432
433def setquit():
434 """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