On this page
posixpath.abspath
Up: posixpath | Next: posixpath.basename
Rel: posixpath.basename, posixpath.commonpath, posixpath.commonprefix, posixpath.dirname
Ref: docs.python.org — posixpath.abspath
Tags: #public #python3 #stdlib #posixpath
Import
import posixpath
from posixpath import abspath
Signature & Overview
posixpath.abspath(path)
Return an absolute path.
Usage
import posixpath
assert posixpath.isabs(posixpath.abspath('notes.txt'))
Gotchas
- Prefer
os.path.abspath()orPath.resolve()in portable code.
REPL Inspect
from posixpath import abspath
help(abspath)
Linked from
- tuts/python3/stdlib_module/posixpath
- tuts/python3/stdlib_module/posixpath/basename
- tuts/python3/stdlib_module/posixpath/commonpath
- tuts/python3/stdlib_module/posixpath/commonprefix
- tuts/python3/stdlib_module/posixpath/dirname
- tuts/python3/stdlib_module/posixpath/exists
- tuts/python3/stdlib_module/posixpath/expanduser
- tuts/python3/stdlib_module/posixpath/expandvars
- tuts/python3/stdlib_module/posixpath/getatime
- tuts/python3/stdlib_module/posixpath/getctime
- tuts/python3/stdlib_module/posixpath/getmtime
- tuts/python3/stdlib_module/posixpath/getsize
- tuts/python3/stdlib_module/posixpath/isabs
- tuts/python3/stdlib_module/posixpath/isdevdrive
- tuts/python3/stdlib_module/posixpath/isdir
- tuts/python3/stdlib_module/posixpath/isfile
- tuts/python3/stdlib_module/posixpath/isjunction
- tuts/python3/stdlib_module/posixpath/islink
- tuts/python3/stdlib_module/posixpath/ismount
- tuts/python3/stdlib_module/posixpath/join
- tuts/python3/stdlib_module/posixpath/lexists
- tuts/python3/stdlib_module/posixpath/normcase
- tuts/python3/stdlib_module/posixpath/normpath
- tuts/python3/stdlib_module/posixpath/realpath
- tuts/python3/stdlib_module/posixpath/relpath
- tuts/python3/stdlib_module/posixpath/samefile
- tuts/python3/stdlib_module/posixpath/sameopenfile
- tuts/python3/stdlib_module/posixpath/samestat
- tuts/python3/stdlib_module/posixpath/split
- tuts/python3/stdlib_module/posixpath/splitdrive
- tuts/python3/stdlib_module/posixpath/splitext
- tuts/python3/stdlib_module/posixpath/splitroot
Related notes
- tuts/python3/stdlib_module/posixpath/basename Linked here; links to this page; shared tags: #posixpath, #stdlib
- tuts/python3/stdlib_module/posixpath/commonpath Linked here; links to this page; shared tags: #posixpath, #stdlib
- tuts/python3/stdlib_module/posixpath/commonprefix Linked here; links to this page; shared tags: #posixpath, #stdlib
- tuts/python3/stdlib_module/posixpath/dirname Linked here; links to this page; shared tags: #posixpath, #stdlib
- tuts/python3/stdlib_module/posixpath Linked here; links to this page; shared tags: #stdlib
- tuts/python3/stdlib_module/posixpath/exists links to this page; shared tags: #posixpath, #stdlib
- tuts/python3/stdlib_module/posixpath/expanduser links to this page; shared tags: #posixpath, #stdlib
- tuts/python3/stdlib_module/posixpath/expandvars links to this page; shared tags: #posixpath, #stdlib
- tuts/python3/stdlib_module/posixpath/getatime links to this page; shared tags: #posixpath, #stdlib
- tuts/python3/stdlib_module/posixpath/getctime links to this page; shared tags: #posixpath, #stdlib