[issue10835] sys.executable default and altinstall

2021-08-07 Thread Eryk Sun
Eryk Sun added the comment: In 3.2, the default program name on non-Windows systems was changed to "python3" (see bpo-15020). In 3.5, the code was moved into Python/pylifecycle.c (see bpo-22869). Between 3.7 and 3.8, the initialization code was rewritten (see PEP 587). Currently it's set in

[issue10835] sys.executable default and altinstall

2021-08-07 Thread Irit Katriel
Irit Katriel added the comment: I can't reproduce this on 3.11, and I don't see a "progname" variable in Python/pythonrun.c. I will close this unless someone will indicate it is still relevant. -- nosy: +iritkatriel resolution: -> out of date status: open -> pending ___

[issue10835] sys.executable default and altinstall

2014-03-17 Thread Éric Araujo
Changes by Éric Araujo : -- versions: +Python 3.5 -Python 2.7, Python 3.1, Python 3.2 ___ Python tracker ___ ___ Python-bugs-list mail

[issue10835] sys.executable default and altinstall

2014-03-11 Thread Piotr Dobrogost
Piotr Dobrogost added the comment: > Garbage in, garbage out. In this case – exec -a '' – yes, but in general not so – see "Mismatch between sys.executable and sys.version in Python" question at SO (http://stackoverflow.com/q/22236727/95735). As to not guessing Victor STINNER in comment http

[issue10835] sys.executable default and altinstall

2011-01-08 Thread Éric Araujo
Changes by Éric Araujo : -- nosy: +eric.araujo ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.pyth

[issue10835] sys.executable default and altinstall

2011-01-06 Thread Martin v . Löwis
Martin v. Löwis added the comment: > I agree that not guessing would be better. Well, on Linux, readlink("/proc/self/exe") would be better than guessing. -- ___ Python tracker

[issue10835] sys.executable default and altinstall

2011-01-06 Thread R. David Murray
R. David Murray added the comment: I agree that not guessing would be better. But as long as we *are* guessing, it seems to me that /usr/bin/python2.7 would be less wrong than /usr/bin/python, for almost all modern unix systems. -- ___ Python trac

[issue10835] sys.executable default and altinstall

2011-01-06 Thread Martin v . Löwis
Martin v. Löwis added the comment: I fail to see the bug. Garbage in, garbage out. AFAIU, returning /usr/bin/python2.7 still might be the wrong answer. -- nosy: +loewis ___ Python tracker

[issue10835] sys.executable default and altinstall

2011-01-06 Thread Stéphane Gaudreault
Changes by Stéphane Gaudreault : -- nosy: +stephane ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail

[issue10835] sys.executable default and altinstall

2011-01-05 Thread Arfrever Frehtes Taifersar Arahesis
Arfrever Frehtes Taifersar Arahesis added the comment: I rather doubt that there will be any problem with Python invoked through a wrapper. Gentoo's python-wrapper isn't used when target executable (e.g. /usr/bin/python3.1) is directly called. A side effect of python-wrapper is that sys.exec

[issue10835] sys.executable default and altinstall

2011-01-05 Thread R. David Murray
R. David Murray added the comment: Well, the digits are there if they are there in the name when that's actually what is in argv[0], so as long as that's the name the binary is actually installed under I don't think it will break anything. I presume the same applies to the abi flags but have

[issue10835] sys.executable default and altinstall

2011-01-05 Thread Barry A. Warsaw
Barry A. Warsaw added the comment: For Python < 3.2, I think adding the version number alone makes sense. Can you think of any situations where the trailing digits could break something? For Python 3.2 I'd suggest also adding the build flags to sys.executable. If you want the most specific

[issue10835] sys.executable default and altinstall

2011-01-05 Thread Antoine Pitrou
Changes by Antoine Pitrou : -- nosy: +barry ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.

[issue10835] sys.executable default and altinstall

2011-01-05 Thread R. David Murray
Changes by R. David Murray : -- nosy: +ncoghlan ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.pyt

[issue10835] sys.executable default and altinstall

2011-01-05 Thread R. David Murray
R. David Murray added the comment: Another alternative might be to return "None" ("refuse the temptation to guess"). But, given the long standing nature of the current guessing, having it return the specific version string may indeed make sense. -- keywords: +easy nosy: +r.david.murr

[issue10835] sys.executable default and altinstall

2011-01-05 Thread Allan McRae
New submission from Allan McRae : 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 i