Message125420
when sys.executable is run with a modified argv[0] such as:
> sh -c "exec -a '' /usr/bin/python2.7 -c 'import sys; print(sys.executable)'"
it returns some a hardcoded value. In this case, it returns /usr/bin/python. This value is likely wrong when python is installed with "make altinstall".
A possible solution is to modify the "progname" variable in Python/pythonrun.c to include the version in it so that the hardcoded return value is the most version specific binary. I.e.
static char *progname = "python2.7"; |
|
Date |
User |
Action |
Args |
2011-01-05 12:51:34 | allan | set | recipients:
+ allan |
2011-01-05 12:51:34 | allan | set | messageid: <1294231894.7.0.0581440878919.issue10835@psf.upfronthosting.co.za> |
2011-01-05 12:51:33 | allan | link | issue10835 messages |
2011-01-05 12:51:33 | allan | create | |
|