On Tue, Jan 26, 2016 at 2:06 PM, Robert T. McGibbon <[email protected]> wrote: > Virtualenvs have `sys.base_prefix`, so perhaps they could just check whether > the key exists for their parent environment?
I think only shiny-new "venvs" have this, not old-school virtualenvs: ~$ /usr/bin/virtualenv -p /usr/bin/python2.7 tmp-env Running virtualenv with interpreter /usr/bin/python2.7 New python executable in tmp-env/bin/python2.7 Also creating executable in tmp-env/bin/python Installing setuptools, pip...done. ~$ tmp-env/bin/python Python 2.7.11 (default, Dec 9 2015, 00:29:25) [GCC 5.3.1 20151205] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> import sys >>> sys.base_prefix Traceback (most recent call last): File "<stdin>", line 1, in <module> AttributeError: 'module' object has no attribute 'base_prefix' -n -- Nathaniel J. Smith -- https://vorpus.org _______________________________________________ Distutils-SIG maillist - [email protected] https://mail.python.org/mailman/listinfo/distutils-sig
