Update.
I found a way for getting the home directory of the user but it
requires to validate the user by providing username+password:
def get_homedir(username, password):
token = win32security.LogonUser(
username,
None,
password,
win32security.LOGON32_LOGON_NETWORK,
win32security.LOGON32_PROVIDER_DEFAULT
)
return win32profile.GetUserProfileDirectory(token)
What I'd like to do is avoiding the requirement of the password, the
same way as if I would on UNIX where it would be enough just using the
pwd module:
>>> import pwd
>>> pwd.getpwnam('user').pw_dir
'/home/user'
--
http://mail.python.org/mailman/listinfo/python-list