[IPython-user]: IPython install under Win2000

Jerry McRae qrs0xyc02 at sneakemail.com
Mon Jul 18 13:51:13 CDT 2005


Hi Fernando,

You <F> wrote on Monday (7/18/2005 at 2:21 PM) thus about [Fwd] Re: [IPython-user] Re[2]: IPython install under Win2000:
F> 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 
>>>application. 
>> 
>> 
>> So in Win2000 and WinXP, in any case, relying on
>> USERPROFILE will work better than relying on HOME.

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

F>              try:
F>                  return 
F> os.path.join(os.environ['HOMEDRIVE'],os.environ['HOMEPATH'])
F>              except:
F>                  try:
F>                      # Use the registry to get the 'My Documents' folder.
F>                      import _winreg as wreg
F>                      key = wreg.OpenKey(wreg.HKEY_CURRENT_USER,
 
F> "Software\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders")
F>                      homedir = wreg.QueryValueEx(key,'Personal')[0]
F>                      key.Close()
F>                      return homedir
F>                  except:
F>                      return 'C:\\'

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

I agree that USERPROFILE would make more sense.  That would allow
people to designate a different starting folder for running cmd.exe.
Of course I rarely do this, since I have a shortcut that runs IPython
every time I want to access DOS commands.  (:-)


-- 
Jerry
___________________________
Blows are sarcasms turned stupid. --George Eliot


=========
(Python 2.3.5, IPython 0.6.13, Windows XP)




More information about the IPython-user mailing list