This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author ned.deily
Recipients ned.deily, ronaldoussoren, tdsmith, vinay.sajip
Date 2014-10-12.06:34:20
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
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)'

$ 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)'
Date User Action Args
2014-10-12 06:34:20ned.deilysetrecipients: + ned.deily, vinay.sajip, ronaldoussoren, tdsmith
2014-10-12 06:34:20ned.deilysetmessageid: <>
2014-10-12 06:34:20ned.deilylinkissue22490 messages
2014-10-12 06:34:20ned.deilycreate