
7 Jul
2007
7 Jul
'07
12:28 p.m.
Kim Barrett wrote:
At 9:35 PM -0400 7/6/07, Edward Diener wrote:
There may also be some Pythonic library way of determine the home directory for any OS without resorting to attempting to hardcode an environmental variable name. I will look for the latter and report it here if I find it.
os.path.expanduser("~")
Yes, but it erroneously looks for the HOME environment variable first, before looking for the HOMEDRIVE/HOMEPATH combination. The latter is always correct on Windows. Looking for HOME first is just plain wrong, especially as HOME is set for an MSYS ( MingW **ix emulation ) installation on Windows to point to the MSYS home directory. I brought this up on the comp.lang.python forum yesterday but no one responded there yet.