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

Function abspath

Lib/ntpath.py:517–526  ·  view source on GitHub ↗

Return the absolute version of a path.

(path)

Source from the content-addressed store, hash-verified

515
516except ImportError: # not running on Windows - mock up something sensible
517 def abspath(path):
518 """Return the absolute version of a path."""
519 path = os.fspath(path)
520 if not isabs(path):
521 if isinstance(path, bytes):
522 cwd = os.getcwdb()
523 else:
524 cwd = os.getcwd()
525 path = join(cwd, path)
526 return normpath(path)
527
528else: # use native Windows method on Windows
529 def abspath(path):

Calls 4

normpathFunction · 0.90
splitrootFunction · 0.90
isabsFunction · 0.70
joinFunction · 0.70

Used in the wild real call sites across dependent graphs

searching dependent graphs…