Looking through the new pathlib
module in Python 3.4, I notice that there isn't any simple way to get the user's home directory. The only way I can come up with for getting a user's home directory is to use the older os.path
lib like so:
import pathlib
from os import path
p = pathlib.Path(path.expanduser("~"))
This seems clunky. Is there a better way?
As of python-3.5, there is Path.home()
, which improves the situation somewhat.