On this page
ntpath.realpath
Prev: ntpath.normpath | Up: ntpath | Next: ntpath.relpath
Rel: ntpath.abspath, ntpath.basename, ntpath.commonpath, ntpath.commonprefix
Ref: docs.python.org — ntpath.realpath
Tags: #public #python3 #stdlib #ntpath
Import
import ntpath
from ntpath import realpath
Signature & Overview
ntpath.realpath(path, *, strict=False)
ntpath.realpath() function.
Usage
import ntpath
assert ntpath.isabs(ntpath.realpath('.'))
Gotchas
- Resolves all symlinks: Pass
strict=True(Python 3.10+) to fail if the path doesn't exist.
REPL Inspect
from ntpath import realpath
help(realpath)
Linked from
Related notes
- tuts/python3/stdlib_module/ntpath/normpath Linked here; links to this page; shared tags: #ntpath, #stdlib
- tuts/python3/stdlib_module/ntpath/relpath Linked here; links to this page; shared tags: #ntpath, #stdlib
- tuts/python3/stdlib_module/ntpath Linked here; links to this page; shared tags: #stdlib
- tuts/python3/stdlib_module/ntpath/abspath Linked here; shared tags: #ntpath, #stdlib
- tuts/python3/stdlib_module/ntpath/basename Linked here; shared tags: #ntpath, #stdlib
- tuts/python3/stdlib_module/ntpath/commonpath Linked here; shared tags: #ntpath, #stdlib
- tuts/python3/stdlib_module/ntpath/commonprefix Linked here; shared tags: #ntpath, #stdlib
- tuts/python3/stdlib_module/ntpath/dirname shared tags: #ntpath, #stdlib
- tuts/python3/stdlib_module/ntpath/exists shared tags: #ntpath, #stdlib
- tuts/python3/stdlib_module/ntpath/expanduser shared tags: #ntpath, #stdlib