Message229119
A comment on Vinay's comment: "and this cannot be obtained from sys.executable because that is pointing to a framework executable". That *was* true prior to 3.3 and is still true at the moment for 2.7.x but it is not true for 3.3+. Ronald's change (b79d276041a8) in Issue15307 for venv framework support changed the stub launcher to no longer do a realpath() on the executable name which means that sys.executable contains the path to the Python stub launcher whether or not in a venv: $ ls -l /usr/local/bin/python2.7 lrwxr-xr-x 1 root admin 71 Jul 3 01:21 /usr/local/bin/python2.7 -> ../../../Library/Frameworks/Python.framework/Versions/2.7/bin/python2.7 $ /usr/local/bin/python2.7 -c 'import sys;print(sys.executable)' /Library/Frameworks/Python.framework/Versions/2.7/Resources/Python.app/Contents/MacOS/Python $ ls -l /usr/local/bin/python3.4 lrwxr-xr-x 1 root wheel 71 Oct 6 16:53 /usr/local/bin/python3.4 -> ../../../Library/Frameworks/Python.framework/Versions/3.4/bin/python3.4 $ /usr/local/bin/python3.4 -c 'import sys;print(sys.executable)' /usr/local/bin/python3.4 | |
| Date | User | Action | Args | | 2014-10-12 06:34:20 | ned.deily | set | recipients: + ned.deily, vinay.sajip, ronaldoussoren, tdsmith | | 2014-10-12 06:34:20 | ned.deily | set | messageid: <1413095660.45.0.756109838308.issue22490@psf.upfronthosting.co.za> | | 2014-10-12 06:34:20 | ned.deily | link | issue22490 messages | | 2014-10-12 06:34:20 | ned.deily | create | | |