ID EN
OS Path

realpath

Python 3.11

Return the canonical path of the specified filename, eliminating any symbolic links encountered in the path (if they are supported by the operating system).

Syntax

PYTHON
os.path.realpath(path, *, strict=False)

See Also

OSError FileNotFoundError OSError os.path.ALLOW_MISSING FileNotFoundError path-like object ALLOW_MISSING