Finding user's home dir

A

Alec Wysoker

Could you explain a little more clearly what the problem is? In the implementation of expanduser in Python 2.3.4, it uses the value of HOME env var if it exists, otherwise, it uses HOMEDRIVE + HOMEPATH. I don't have access to a Win 2K machine right now, but my recollection is that when I did, HOMEDRIVE and HOMEPATH were set by Windows, so the right thing should happen.

Do you not have HOMEDRIVE + HOMEPATH set in your environment, e.g. if you open a CMD.exe window?

When you say that it returned %USERPROFILE%, do you mean that it returned that actual string, or the value of that env var?

Or is it that you want it to return the path to your My Documents directory, which is not necessarily the same thing as %HOME%?

Thanks, Alec
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,774
Messages
2,569,596
Members
45,141
Latest member
BlissKeto
Top