What is the Windows equivalent of pwd.getpwnam(username).pw_dir?

前端 未结 4 1590
醉酒成梦
醉酒成梦 2021-01-05 06:05

The Python pwd module provides access to getpwnam(3) POSIX API, which can be used to get the home directory for a particular user by username, as well determini

4条回答
  •  青春惊慌失措
    2021-01-05 06:34

    This seems to be only applicable to the current user, but on my (winxp) machine, os.path.expanduser('~') returns my home directory.

提交回复
热议问题