Automatically creating a HOME environ variable on Windows?

Jorgen Grahn jgrahn-nntq at
Mon Oct 31 01:35:54 CET 2005

On Sat, 29 Oct 2005 18:43:44 +0200, Maciej Dziardziel <fiedzia at> wrote:
> jim.eggleston at wrote:
>> Cool, even better. So what's best, having code to add HOME
>> (=USERPROFILE) to os.environ, or change the various places that HOME is
>> used to check for USERPROFILE?
> Best solution would be to have portable function that returns
> user home directory and knows about all platfom quirks.

Why is that better than Python creating a HOME in os.environ, if it doesn't
already exist?  I can think of a few reasons it's better, and a few reasons
it's worse.


  // Jorgen Grahn <jgrahn@       Ph'nglui mglw'nafh Cthulhu
\X/      >   R'lyeh wgah'nagl fhtagn!

More information about the Python-list mailing list