PyDocs

Nav

File and Directory Access

Path.resolve

pathlib

method of Path (source)
  • Path.resolve(strict=False)
Make the path absolute, resolving all symlinks on the way and also
normalizing it.
Changed in 3.6, 3.13
  • 3.6: The strict parameter was added (pre-3.6 behavior is strict).
  • 3.13: Symlink loops are treated like other errors: OSError is raised in strict mode, and no exception is raised in non-strict mode. In previous versions, RuntimeError is raised no matter the value of strict.
1 Example
>>> p = Path()
>>> p
PosixPath('.')
>>> p.resolve()
PosixPath('/home/antoine/pathlib')
from the Python docs
See Also
No see-alsos for pathlib/Path.resolve
0 Notes
No notes for Path.resolve