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.

classification
Title: Bad sys.executable value for bdist_wininst install script
Type: Stage:
Components: Distutils Versions:
process
Status: closed Resolution: rejected
Dependencies: Superseder:
Assigned To: theller Nosy List: theller, xfollower
Priority: normal Keywords:

Created on 2005-04-12 16:49 by xfollower, last changed 2022-04-11 14:56 by admin. This issue is now closed.

Messages (2)
msg25003 - (view) Author: follower (xfollower) Date: 2005-04-12 16:49
Description copied from:
 <1106904639.22381.python-list%40python.org">http://groups.google.com/groups?selm=mailman.1490.1106904639.22381.python-list%40python.org>

>From the Python docs, sys.executable is:

executable
    A string giving the name of the executable binary
for the Python interpreter, on systems where this makes
sense.

However, during the execution of a post-install script,
this string actually resolves to the name of the binary
installer!  This name should resolve, I think to the
name of the Python executable for which the installer
is running (a value selectable at the start of the
installation, if more than one Python is detected). 
Having this value available allows you to properly
generate shortcuts with the proper full path to the
python executable.

I resorted to using sys.prefix+r'\python.exe', which
will most likely work, but I'd rather see
sys.executable give me a more sensible answer.
msg25004 - (view) Author: Thomas Heller (theller) * (Python committer) Date: 2005-04-19 19:46
Logged In: YES 
user_id=11105

I interpreted the docs you quote as 'the Python interpreter
that is currently running' and not 'the Python interpreter
that is normally used'.

OTOH, it's too late to change this for 2.4 anyway.
History
Date User Action Args
2022-04-11 14:56:10adminsetgithub: 41850
2005-04-12 16:49:51xfollowercreate