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

Function _guess_pycache_prefix

library/python/runtime_py3/__res.py:153–165  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

151
152
153def _guess_pycache_prefix():
154 env_val = _probe(_os.environ, 'PYTHONPYCACHEPREFIX')
155 if env_val:
156 return _s(env_val)
157
158 path, tail = _os.getcwd(), 'start'
159
160 while tail:
161 guidence_file = _path_join(path, '.pycache.path')
162 if _path_isfile(guidence_file):
163 return _s(file_bytes(guidence_file))
164
165 path, tail = _path_split(path)
166
167
168Y_PYTHON_SOURCE_ROOT = _get_source_root()

Callers 1

__res.pyFile · 0.85

Calls 2

_probeFunction · 0.85
file_bytesFunction · 0.85

Tested by

no test coverage detected