There’s been a bit of discussion on the reliability of getting other users' home directories via os.path.expanduser(), mostly on issue42998 <https://bugs.python.org/issue42998>.
In msg390503 <https://bugs.python.org/issue42998#msg390503>, Serhiy Storchaka pointed out that ntpath only makes an educated guess of other user’s home directories. In msg390535 <https://bugs.python.org/issue42998#msg390535>, Eryk Sun supplied an improved ntpath implementation that makes use of winreg and ctypes. In msg391970 <https://bugs.python.org/issue42998#msg391970>, Steve Dower pointed out that, if retrieving another user’s home directory on Windows is unlikely to be made reliable, we should look at deprecating this functionality in expanduser() >From a bit of googling, Python seems to be an outlier in having a function to retrieve another user’s home directory. I am encouraged by Eryk’s patch, but a little out of my depth with Windows stuff. Any views on this? Is expanduser(‘~other’) fixable and worth fixing? If not, should we deprecate this functionality? Or something else? Barney
_______________________________________________ Python-Dev mailing list -- python-dev@python.org To unsubscribe send an email to python-dev-le...@python.org https://mail.python.org/mailman3/lists/python-dev.python.org/ Message archived at https://mail.python.org/archives/list/python-dev@python.org/message/BBLJXDRQ6WIG42AIOWTL43JEZUJF5TTY/ Code of Conduct: http://python.org/psf/codeofconduct/