[Python-ideas] PYTHONUSERBASES (plural!)

Nick Coghlan ncoghlan at gmail.com
Thu Apr 23 13:35:39 CEST 2009

Larry Hastings wrote:
> Even ignoring those details I still don't agree.  I think adding to a
> single environment variable is far cleaner than copying/linking files
> around on disks.  It can be done easily on a command-by-command basis,
> or stowed in a shell script or an alias, not to mention easily managed
> by a virtualized environment system like virtualenv.

If you're monkeying with an environment variable, then why not just
modify PYTHONPATH directly?

Also, messing with environment variables on Windows is a real PITA
(largely because there is no env equivalent).

> Shall I put you down as a -1?  (I'm not having a lot of luck getting
> numeric votes outta folks.)

Yep, it currently gets a "-1, redundant" from me.

However, I think you would get much less push back if you:
1. Articulated clearly the specific scenarios you want to support beyond
the simple single user site-packages equivalent that PYTHONUSERBASE was
designed to support
2. Described why PYTHONUSERBASE + .pth files don't support them well
3. Described why traditional sys.path altering techniques (e.g. via
PYTHONPATH) or tools like virtualenv aren't adequate to address these
4. Described precisely how your new mechanism improves support for the
identified scenarios.

So far it appears to me that you've picked up the shiny new
PYTHONUSERBASE hammer and are trying to hit a screw with it when there
are plenty of existing screwdrivers lying around. However, I don't know
if that is actually what is going on, or if I just haven't understood
the use cases you are wanting to support.


P.S. I'm moving house tomorrow and don't know when I will get my net
connection back. So don't worry too much about trying to persuade me - I
probably won't be around until after the first 3.1 beta has already

Nick Coghlan   |   ncoghlan at gmail.com   |   Brisbane, Australia

More information about the Python-ideas mailing list