PyDocs

Nav

File and Directory Access

Path.absolute

pathlib

method of Path (source)
  • Path.absolute()
Return an absolute version of this path
No normalization or symlink resolution is performed.

Use resolve() to resolve symlinks and remove '..' segments.
1 Example
>>> p = Path('tests')
>>> p
PosixPath('tests')
>>> p.absolute()
PosixPath('/home/antoine/pathlib/tests')
from the Python docs
See Also
No see-alsos for pathlib/Path.absolute
0 Notes
No notes for Path.absolute