Function
posixpath.expanduser

Signature

expanduser(path)

Documentation String

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