Automatically creating a HOME environ variable on Windows?

Jorgen Grahn jgrahn-nntq at algonet.se
Mon Oct 31 09:22:36 EST 2005


On Mon, 31 Oct 2005 12:26:30 +0100, Maciej Dziardziel <fiedzia at fiedzia.prv.pl> wrote:
> Jorgen Grahn wrote:
>
>>> 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.
>
> First, it is possible that HOME viariable already exists and has different
> meaning, (if python is used as embedded scripting language it can be
> defined by application),

And on systems where $HOME exists, that's what this new abstraction would
have to use internally anyway, so us Unix users won't lose anything. OK, I
accept the reasoning.

/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