On this page
  1. posixpath.expanduser
  2. Import
  3. Signature & Overview
  4. Usage
  5. Gotchas
  6. REPL Inspect

posixpath.expanduser

Prev: posixpath.exists | Up: posixpath | Next: posixpath.expandvars
Rel: posixpath.abspath, posixpath.basename, posixpath.commonpath, posixpath.commonprefix
Ref: docs.python.org — posixpath.expanduser
Tags: #public #python3 #stdlib #posixpath


Import

import posixpath
from posixpath import expanduser

Signature & Overview

posixpath.expanduser(path)

Expand ~ and ~user constructions. If user or $HOME is unknown, do nothing.

Usage

import posixpath

assert len(posixpath.expanduser('~')) > 0

Gotchas

REPL Inspect

from posixpath import expanduser
help(expanduser)

Linked from

Related notes