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

Function get_path0

library/python/runtime_py3/__res.py:700–714  ·  view source on GitHub ↗

An incomplete and simplified version of _PyPathConfig_ComputeSysPath0. We need this to somewhat properly emulate the behaviour of a normal python interpreter when using ya ide venv.

()

Source from the content-addressed store, hash-verified

698
699
700def get_path0():
701 """
702 An incomplete and simplified version of _PyPathConfig_ComputeSysPath0.
703 We need this to somewhat properly emulate the behaviour of a normal python interpreter
704 when using ya ide venv.
705
706 """
707 if not sys.argv:
708 return
709 argv0 = sys.argv[0]
710
711 have_module_arg = argv0 == '-m'
712
713 if have_module_arg:
714 return _os.getcwd()
715
716
717if YA_IDE_VENV:

Callers 1

__res.pyFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected