MCPcopy Create free account
hub / github.com/RT-Thread/env-windows / _get_path

Function _get_path

tools/python-3.11.9-amd64/Lib/site.py:298–308  ·  view source on GitHub ↗
(userbase)

Source from the content-addressed store, hash-verified

296
297# Same to sysconfig.get_path('purelib', os.name+'_user')
298def _get_path(userbase):
299 version = sys.version_info
300
301 if os.name == 'nt':
302 ver_nodot = sys.winver.replace('.', '')
303 return f'{userbase}\\Python{ver_nodot}\\site-packages'
304
305 if sys.platform == 'darwin' and sys._framework:
306 return f'{userbase}/lib/python/site-packages'
307
308 return f'{userbase}/lib/python{version[0]}.{version[1]}/site-packages'
309
310
311def getuserbase():

Callers 1

getusersitepackagesFunction · 0.85

Calls 1

replaceMethod · 0.45

Tested by

no test coverage detected