On this page
ntpath.abspath
Up: ntpath | Next: ntpath.basename
Rel: ntpath.basename, ntpath.commonpath, ntpath.commonprefix, ntpath.dirname
Ref: docs.python.org — ntpath.abspath
Tags: #public #python3 #stdlib #ntpath
Import
import ntpath
from ntpath import abspath
Signature & Overview
ntpath.abspath(path)
Return the absolute version of a path.
Usage
import ntpath
assert ntpath.isabs(ntpath.abspath('notes.txt'))
Gotchas
- Uses the host OS CWD: For pure Windows path manipulation on Unix without touching the host CWD, use
pathlib.PureWindowsPath.
REPL Inspect
from ntpath import abspath
help(abspath)
Linked from
- tuts/python3/stdlib_module/ntpath
- tuts/python3/stdlib_module/ntpath/basename
- tuts/python3/stdlib_module/ntpath/commonpath
- tuts/python3/stdlib_module/ntpath/commonprefix
- tuts/python3/stdlib_module/ntpath/dirname
- tuts/python3/stdlib_module/ntpath/exists
- tuts/python3/stdlib_module/ntpath/expanduser
- tuts/python3/stdlib_module/ntpath/expandvars
- tuts/python3/stdlib_module/ntpath/getatime
- tuts/python3/stdlib_module/ntpath/getctime
- tuts/python3/stdlib_module/ntpath/getmtime
- tuts/python3/stdlib_module/ntpath/getsize
- tuts/python3/stdlib_module/ntpath/isabs
- tuts/python3/stdlib_module/ntpath/isdevdrive
- tuts/python3/stdlib_module/ntpath/isdir
- tuts/python3/stdlib_module/ntpath/isfile
- tuts/python3/stdlib_module/ntpath/isjunction
- tuts/python3/stdlib_module/ntpath/islink
- tuts/python3/stdlib_module/ntpath/ismount
- tuts/python3/stdlib_module/ntpath/isreserved
- tuts/python3/stdlib_module/ntpath/join
- tuts/python3/stdlib_module/ntpath/lexists
- tuts/python3/stdlib_module/ntpath/normcase
- tuts/python3/stdlib_module/ntpath/normpath
- tuts/python3/stdlib_module/ntpath/realpath
- tuts/python3/stdlib_module/ntpath/relpath
- tuts/python3/stdlib_module/ntpath/samefile
- tuts/python3/stdlib_module/ntpath/sameopenfile
- tuts/python3/stdlib_module/ntpath/samestat
- tuts/python3/stdlib_module/ntpath/split
- tuts/python3/stdlib_module/ntpath/splitdrive
- tuts/python3/stdlib_module/ntpath/splitext
- tuts/python3/stdlib_module/ntpath/splitroot
Related notes
- tuts/python3/stdlib_module/ntpath/basename Linked here; links to this page; shared tags: #ntpath, #stdlib
- tuts/python3/stdlib_module/ntpath/commonpath Linked here; links to this page; shared tags: #ntpath, #stdlib
- tuts/python3/stdlib_module/ntpath/commonprefix Linked here; links to this page; shared tags: #ntpath, #stdlib
- tuts/python3/stdlib_module/ntpath/dirname 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/exists links to this page; shared tags: #ntpath, #stdlib
- tuts/python3/stdlib_module/ntpath/expanduser links to this page; shared tags: #ntpath, #stdlib
- tuts/python3/stdlib_module/ntpath/expandvars links to this page; shared tags: #ntpath, #stdlib
- tuts/python3/stdlib_module/ntpath/getatime links to this page; shared tags: #ntpath, #stdlib
- tuts/python3/stdlib_module/ntpath/getctime links to this page; shared tags: #ntpath, #stdlib