MCPcopy Index your code
hub / github.com/pymupdf/PyMuPDF / venv_in

Function venv_in

scripts/test.py:1552–1560  ·  view source on GitHub ↗

If path is None, returns true if we are in a venv. Otherwise returns true only if we are in venv .

(path=None)

Source from the content-addressed store, hash-verified

1550
1551
1552def venv_in(path=None):
1553 '''
1554 If path is None, returns true if we are in a venv. Otherwise returns true
1555 only if we are in venv <path>.
1556 ''&#x27;
1557 if path:
1558 return os.path.abspath(sys.prefix) == os.path.abspath(path)
1559 else:
1560 return sys.prefix != sys.base_prefix
1561
1562
1563def venv_run(args, path, recreate=True, clean=False):

Callers 1

mainFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…