Automatically creating a HOME environ variable on Windows?

jim.eggleston at gmail.com jim.eggleston at gmail.com
Tue Nov 1 05:39:50 EST 2005


Having a function is definitely cleaner. Creating a HOME environment
variable where one does not exist in the calling shell is misleading.

There are 10 modules in the python 2.3 lib directory that contain
os.environ['HOME']:

lib\ftplib.py
lib\mailbox.py
lib\mailcap.py
lib\netrc.py
lib\ntpath.py
lib\os2emxpath.py
lib\pdb.py
lib\posixpath.py
lib\rfc822.py
lib\user.py

It's probably not a huge effort to change these (but that's easy for me
to say ...) It would be nice to start of with having a standard way to
find out what the home directory is.




More information about the Python-list mailing list