Per user dirs on Non-Unix platforms (was Re: [Python-Dev] Where
to install non-code files)
Fred L. Drake
Tue, 30 May 2000 07:22:42 -0700 (PDT)
On Sun, 28 May 2000, Guido van Rossum wrote:
> > Idea: Wouldn't it be nice if the 'nt' and 'mac' versions of the 'os'
> > module would provide 'os.environ["HOME"]' similar to the posix
> > version? This would certainly simplify the task of application
> > programmers intending to write portable applications.
> This sounds like a nice idea...
Now that this idea has fermented for a few days, I'm inclined to not
like it. It smells of making Unix-centric interface to something that
isn't terribly portable as a concept.
Perhaps there should be a function that does the "right thing",
extracting os.environ["HOME"] if defined, and taking an alternate approach
(os.getcwd() or whatever) otherwise. I don't think setting
os.environ["HOME"] in the library is a good idea because that changes the
environment that gets published to child processes beyond what the
Fred L. Drake, Jr. <fdrake at acm.org>