🔵 🔵 🔵


Primary

၊၊||၊|။

Path.expanduser() ⚬|Documentation|1st|20260611132244-00-⌔

pathlib — Object-oriented filesystem paths — Python 3.14.6 documentation#pathlib.Path.expanduser

Path.expanduser()

Return a new path with expanded ~ and ~user constructs, as returned by os.path.expanduser(). If a home directory can’t be resolved, RuntimeError is raised.

>>> p = PosixPath('~/films/Monty Python')
>>> p.expanduser()
PosixPath('/home/eric/films/Monty Python')

Added in version 3.5.

Printed 2026-06-28.

(echo:: @ )

Link to original

Secondary

• • •