On Wed, Oct 26, 2011 at 12:14 PM, Carl Meyer
What about "sys.local_prefix"? Doesn't overload site, but also doesn't imply that it always points to a venv. I think "local" carries the right connotation here - this is the prefix for the user's local environment (as possibly opposed to the "global" system environment). Seems like this might make code using the attribute unconditionally read a bit less oddly?
I think explaining to people "sys.venv_prefix is still valid when you're not in a virtual env, it just points to the same place as sys.prefix" is easier than explaining a *new* name with "<whatever name> points to the virtual env directory when you're in a virtual environment and sys.prefix otherwise". So while I agree your concern is valid, I think just living with the quirkiness is a reasonable approach. Cheers, Nick. -- Nick Coghlan | ncoghlan@gmail.com | Brisbane, Australia