Automatically creating a HOME environ variable on Windows?

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


On Sat, 29 Oct 2005 18:43:44 +0200, Maciej Dziardziel <fiedzia at fiedzia.prv.pl> wrote:
> jim.eggleston at gmail.com 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

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



More information about the Python-list mailing list