[Fwd] Re: [IPython-user] Re[2]: IPython install under Win2000

Fernando Perez Fernando.Perez at colorado.edu
Mon Jul 18 13:21:52 CDT 2005

Alan G Isaac wrote:
> On Mon, 18 Jul 2005, Fernando Perez apparently wrote: 
>>In WinXP Home and Pro there is a USERPROFILE and 
>>a HOMEPATH (which is used as a starting directory when 
>>running cmd.exe), but no HOME. So any HOME environment 
>>variable was added by customizing or by another 
> So in Win2000 and WinXP, in any case, relying on
> USERPROFILE will work better than relying on HOME.

Well, for NT if $HOME is undefined, I use this:

                     # Use the registry to get the 'My Documents' folder.
                     import _winreg as wreg
                     key = wreg.OpenKey(wreg.HKEY_CURRENT_USER,
"Software\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders")
                     homedir = wreg.QueryValueEx(key,'Personal')[0]
                     return homedir
                     return 'C:\\'

That's from something I read long ago that said that HOMEDRIVE/HOMEPATH was 
the proper default location.  Is USERPROFILE the right one instead?  I think I 
read that at some microsoft page, but I could be wrong.



ps - and some people still ask me why I hate windows with an unmitigated 
passion...  the platform where the phrase 'where do you want to go today' 
invariably means 'in circles', even for the simplest, seemingly most trivial 
of tasks.

More information about the IPython-user mailing list