MCPcopy Index your code
hub / github.com/python/cpython / pathdirs

Function pathdirs

Lib/pydoc.py:120–130  ·  view source on GitHub ↗

Convert sys.path into a list of absolute, existing, unique paths.

()

Source from the content-addressed store, hash-verified

118# --------------------------------------------------------- common routines
119
120def pathdirs():
121 """Convert sys.path into a list of absolute, existing, unique paths."""
122 dirs = []
123 normdirs = []
124 for dir in sys.path:
125 dir = os.path.abspath(dir or '.')
126 normdir = os.path.normcase(dir)
127 if normdir not in normdirs and os.path.isdir(dir):
128 dirs.append(dir)
129 normdirs.append(normdir)
130 return dirs
131
132def _getdoc(object):
133 return inspect.getdoc(object,

Callers

nothing calls this directly

Calls 4

normcaseMethod · 0.80
abspathMethod · 0.45
isdirMethod · 0.45
appendMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…