[Python-Dev] [Python-3000] Reminder: last alphas next Wednesday 07-May-2008

Mike Meyer mwm at mired.org
Tue May 6 17:29:25 CEST 2008


On Fri, 02 May 2008 00:03:24 -0000 glyph at divmod.com wrote:

> On 11:45 pm, guido at python.org wrote:
> >I like this, except one issue: I really don't like the .local
> >directory. I don't see any compelling reason why this needs to be
> >~/.local/lib/ -- IMO it should just be ~/lib/. There's no need to hide
> >it from view, especially since the user is expected to manage this
> >explicitly.
> 
> I've previously given a spirited defense of ~/.local on this list ( 
> http://mail.python.org/pipermail/python-dev/2008-January/076173.html ) 
> among other places.
> 
> Briefly, "lib" is not the only directory participating in this 
> convention; you've also got the full complement of other stuff that 
> might go into an installation like /usr/local.  So, while "lib" might 
> annoy me a little, "bin etc games include lib lib32 man sbin share src" 
> is going to get ugly pretty fast, especially if this is what comes up in 
> Finder or Nautilus or Explorer every time I open a window.

You have a problem with 10 directories? Well, ok - if you have that on
top of all the clutter that you normally get, yeah, I might object
too. On the other hand, if *every* application used those 10
directories - and *only* those 10 directories - for all the files it
needed that weren't for user-created data, that would be heaven.

The fallacy you're falling into is that users never have to deal with
those dot-files (or directories). They do. One of the most common
operations when trying to diagnose a misbehaving application is
"delete the configuration files" (my favorite is that I fix gnucash
printing failures by deleting CUPS config files....), and the user has
to figure out which, if any, of those magic files need to be
deleted. If you're using Finder, you wind up turning on the preference
that says "show me those", and suddenly your nice, clean directory
explodes into ...

Well, here's my home directory, shared between a Mac and a Unix box:

mbook-fbsd% cd
mbook-fbsd% ls | wc -l
      42
mbook-fbsd% ls -d .* | wc -l
     174

It's not very clean. Because it's a Mac, it's got some directories
that the Mac felt I needed that I really have no use for. And there's
maybe a dozen files there that are scratch files from various things I
haven't cleaned up yet. Of course, the dot-files are much worse,
because I normally don't see them, so there's not incentive to clean
them up at all.

But if i could trade those 172 (can't lose . and ..) "hidden" .files
for 10 visible directories in ~, I'd do it in an instant - even if I
didn't already have bin, etc, src & lib directories there.

> Put another way - it's trivial to make ~/.local/lib show up by 
> symlinking ~/lib, but you can't make ~/lib disappear, and lots of 
> software ends up looking at ~.

Just for the record, it's equally trivial - but better - to make
".local" disappear by symlinking '.local' to '.'. But providing an
option is even cleaner, and then the fact that you can't use symlink
to hide one is moot.

As far as I'm concerned, .local is the worst possible choice for this
choice for this name. Not only does it wind up in the more cluttered
of the two name spaces, it doesn't tell me anything about the
application(s) it belongs to, so I have to worry about it pretty much
every time I'm mucking about with the config files. .python would be
much better - at least I'd know what it was for by the name.

     <mike
-- 
Mike Meyer <mwm at mired.org>		http://www.mired.org/consulting.html
Independent Network/Unix/Perforce consultant, email for more information.

O< ascii ribbon campaign - stop html mail - www.asciiribbon.org


More information about the Python-Dev mailing list