Automatically creating a HOME environ variable on Windows?

jim.eggleston at jim.eggleston at
Tue Nov 1 20:31:51 CET 2005

os.path.expanduser('~') is a bit cryptic for non-unix people.
os.path.gethome() or something like that would be nicer. expanduser()
should then call gethome() so the logic is in one place.

It looks like the existing logic in expanduser() is out of date anyway.
It should be updated to use %USERPROFILE% before %HOMEDRIVE% +

More information about the Python-list mailing list