ID EN
Pathlib

absolute

Python 3.11

Make the path absolute, without normalization or resolving symlinks. Returns a new path object:

Syntax

PYTHON
Path.absolute()

Examples

Example 1
PYTHON
>>> p = Path('tests')
>>> p
PosixPath('tests')
>>> p.absolute()
PosixPath('/home/antoine/pathlib/tests')