Author eldiener
Recipients
Date 2007-07-07.12:44:10
SpamBayes Score
Marked as misclassified
Message-id
In-reply-to
Content
On Windows, using expanduser("~") the home directory is replaced either first by the environment variable HOME or, if that is not found, by a combination of HOMEDRIVE and HOMEPATH."

But HOME is almost never the home directory for Windows, although it is under Linux/Unix, only the combination of HOMEDRIVE and HOMEPATH is valid, which is always set. 

If MSYS is installed under Windows, where HOME must be set to the MSYS home directory for a given user in order to emulate Linux/Unix, attempting to use os.path.expanduser("~") will incorrectly return the MSYS home directory for a given user rather than the Windows home directory for the logged in user. So I think the os.path.expanduser("~") works incorrectly in this case and needs to be fixed, else you are telling users never to use MSYS under Windows. There may be other Linux/Unix emulation packages which can be installed under Windows, and my guess is that if there is then the HOME environment variable gets set to some user home directory under that emulation package, just like it does for MSYS.

The correct order under Windows is to look for the  environment variable combination HOMEDRIVE/HOMEPATH first and only if that is not found ( very unlikely ) should expanduser("~") look for the environment variable HOME.
History
Date User Action Args
2007-08-23 14:58:23adminlinkissue1749583 messages
2007-08-23 14:58:23admincreate