As of python-3.5, there is pathlib.Path.home(), which improves the situation somewhat.
The result on Windows is
>>>pathlib.Path.home()
WindowsPath('C:/Users/username')
and on Linux
>>>pathlib.Path.home()
PosixPath('/home/username')
As of python-3.5, there is pathlib.Path.home(), which improves the situation somewhat.
The result on Windows is
>>>pathlib.Path.home()
WindowsPath('C:/Users/username')
and on Linux
>>>pathlib.Path.home()
PosixPath('/home/username')