PyDocs

Nav

File and Directory Access

Path.expanduser

pathlib

method of Path · Added in 3.5 (source)
  • Path.expanduser()
Return a new path with expanded ~ and ~user constructs
(as returned by os.path.expanduser)
1 Example
>>> p = PosixPath('~/films/Monty Python')
>>> p.expanduser()
PosixPath('/home/eric/films/Monty Python')
from the Python docs
See Also
No see-alsos for pathlib/Path.expanduser
0 Notes
No notes for Path.expanduser