[Python-ideas] PYTHONUSERBASES (plural!)

Larry Hastings larry at hastings.org
Thu Apr 23 09:30:26 CEST 2009

Nick Coghlan wrote:
> A collection of .pth files in a directory is easy to manage. Messing
> with environment variables is a PITA - you need an external solution to
> keep track of what the environment variable should contain for each
> environment.

But to do as you suggest, you also need to "mess with environment 
variables": PYTHONUSERBASE.  Unless you propose changing ~/.local every 
time you switch environments, you need to change that variable every 
time you switch environments.  Therefore your proposed solution must 
modify exactly same amount of environment variables as mine.

Your proposal also adds overhead maintaining those collections of .pth 
files.  For example, if you add a new package to one of your virtualized 
environments, you'd need to update every .pth collection directory which 
references that environment.

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.

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


More information about the Python-ideas mailing list