[Python-ideas] PYTHONUSERBASES (plural!)

Larry Hastings larry at hastings.org
Thu Apr 23 05:41:26 CEST 2009

Nick Coghlan wrote:
> You would have two different directories each with a different .pth file
> in it and point PYTHONUSERBASE at the correct one for the virtual
> environment you want to use.

This would preclude finding packages in my default PYTHONUSERBASE.  Or 
combining any two virtualized environments together.

I suppose that's solvable if we go back to copying files around, like a 
cheap "virtualenv".  I could make a temporary directory, copy in the 
lowest-priority packages and .pth files, then copy in the next-highest, 
and so on for all "user bases" I want to compose together.  Then point 

But I'd really rather have something like PYTHONUSERBASES.  For the 
record, would you be for or against PYTHONUSERBASES?  I think I'm going 
to knock together a patch tonight; I hope you'll support it.

p.s.  Having ruminated about it some more, I'm going to change the name 
to PYTHONPREFIXPATH.  Like "PYTHONPATH", but for "prefix" directories 
(as in "site.PREFIXES").  Still open to suggestions though.//

More information about the Python-ideas mailing list