[issue13402] Document absoluteness of sys.executable

2016-07-11 Thread Ned Deily
Ned Deily added the comment: @blarsen, OK, but if you want to pursue this, please open a new issue against the current versions. This issue was closed years ago and against earlier versions so your comments will not get acted on. -- ___ Python trac

[issue13402] Document absoluteness of sys.executable

2016-07-11 Thread Brad Larsen
Brad Larsen added the comment: @eryksun, you are right! The output *is* an absolute path as far as `os.path.isabs` is concerned. @ned.deily, you are right about my example --- I transcribed it wrong, and it should be `-c`. The system in question is not a Mac OS system, but a Linux system wit

[issue13402] Document absoluteness of sys.executable

2016-07-11 Thread Ned Deily
Ned Deily added the comment: @blarsen, and there's something strange about your example. '-m' won't work with a real python executable, presumably you meant '-c'. And judging from the paths involved, I'm guessing you are using MacPorts on OS X. With either MacPorts or any other OS X framewo

[issue13402] Document absoluteness of sys.executable

2016-07-11 Thread Eryk Sun
Eryk Sun added the comment: "/opt/local/bin/../bin/python2.7" is an absolute path. >>> os.path.isabs('/opt/local/bin/../bin/python2.7') True It's not relative to the working directory. -- nosy: +eryksun ___ Python tracker

[issue13402] Document absoluteness of sys.executable

2016-07-11 Thread Brad Larsen
Brad Larsen added the comment: It looks like sys.executable is *not* always an absolute path. In Python 2.7: $ which python2.7 /opt/local/bin/python2.7 $ cd /opt/local/bin $ ../bin/python2.7 -m 'import sys; print(sys.executable)' /opt/local/bin/../bin/python2.7 Also in Pyth

[issue13402] Document absoluteness of sys.executable

2012-02-02 Thread Roundup Robot
Roundup Robot added the comment: New changeset fdcda5b74317 by Petri Lehtinen in branch '3.2': Document absoluteness of sys.executable http://hg.python.org/cpython/rev/fdcda5b74317 New changeset 8b591a86fc91 by Petri Lehtinen in branch 'default': Merge branch 3.2 http://hg.python.org/cpython/re

[issue13402] Document absoluteness of sys.executable

2012-01-31 Thread Petri Lehtinen
Petri Lehtinen added the comment: Attached one more patch. The documentation now also mentions None as a possible value. -- Added file: http://bugs.python.org/file24380/issue13402_v3.patch ___ Python tracker

[issue13402] Document absoluteness of sys.executable

2012-01-02 Thread Éric Araujo
Éric Araujo added the comment: This discussion seems relevant: http://mail.python.org/pipermail/python-dev/2006-March/062453.html (it talks about the meaning of sys.executable, special cases such as embedded Python and functions that implement it (so we can have a look at that code)). --

[issue13402] Document absoluteness of sys.executable

2011-12-14 Thread Petri Lehtinen
Petri Lehtinen added the comment: > sys.executable can be None on Jython (and I believe IronPython) when ran in > an 'embedded' mode In CPython, embedding doesn't change the behavior. -- ___ Python tracker _

[issue13402] Document absoluteness of sys.executable

2011-12-14 Thread Philip Jenvey
Philip Jenvey added the comment: sys.executable can be None on Jython (and I believe IronPython) when ran in an 'embedded' mode -- nosy: +dino.viehland, pjenvey ___ Python tracker

[issue13402] Document absoluteness of sys.executable

2011-12-14 Thread Petri Lehtinen
Petri Lehtinen added the comment: Attaching an updated patch. The documentation now says that sys.executable may be an empty string. The patch also adds a test to make sure that sys.executable is absolute. -- Added file: http://bugs.python.org/file23958/issue13402_v2.patch __

[issue13402] Document absoluteness of sys.executable

2011-11-25 Thread Antoine Pitrou
Antoine Pitrou added the comment: > > You could also add a test to test_sys ensuring that sys.executable > > is always executable. > > And that sys.executable is absolute? Er, yes, that's what I meant. Sorry. -- ___ Python tracker

[issue13402] Document absoluteness of sys.executable

2011-11-25 Thread STINNER Victor
STINNER Victor added the comment: > You could also add a test to test_sys ensuring that sys.executable > is always executable. And that sys.executable is absolute? sys.executable is an empty string if sys.argv[0] has been changed and Python is unable to retrieve the real path to the Python ex

[issue13402] Document absoluteness of sys.executable

2011-11-25 Thread Antoine Pitrou
Antoine Pitrou added the comment: LGTM too. You could also add a test to test_sys ensuring that sys.executable is always executable. -- ___ Python tracker ___ _

[issue13402] Document absoluteness of sys.executable

2011-11-25 Thread Éric Araujo
Éric Araujo added the comment: This is the bug I was thinking about: #7774. Adding some people from that discussion to nosy. -- nosy: +flox, haypo, pitrou, ronaldoussoren, schmir ___ Python tracker _

[issue13402] Document absoluteness of sys.executable

2011-11-21 Thread Eric Snow
Changes by Eric Snow : -- nosy: +eric.snow ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.o

[issue13402] Document absoluteness of sys.executable

2011-11-21 Thread Petri Lehtinen
Petri Lehtinen added the comment: Éric Araujo wrote: > Patch looks good, but are you 100% sure that sys.executable is > always absolute? (On all OSes, under multiprocessing, etc?) Well, its value is computed by a function named Py_GetProgramFullPath(), so I'm quite sure. I had a quick look on w

[issue13402] Document absoluteness of sys.executable

2011-11-21 Thread Éric Araujo
Éric Araujo added the comment: Patch looks good, but are you 100% sure that sys.executable is always absolute? (On all OSes, under multiprocessing, etc?) -- ___ Python tracker ___

[issue13402] Document absoluteness of sys.executable

2011-11-20 Thread Eli Bendersky
Eli Bendersky added the comment: LGTM -- nosy: +eli.bendersky ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue13402] Document absoluteness of sys.executable

2011-11-20 Thread Petri Lehtinen
Petri Lehtinen added the comment: Attached a patch. -- keywords: +patch Added file: http://bugs.python.org/file23738/issue13402.patch ___ Python tracker ___

[issue13402] Document absoluteness of sys.executable

2011-11-19 Thread Petri Lehtinen
Changes by Petri Lehtinen : -- nosy: +petri.lehtinen ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mai

[issue13402] Document absoluteness of sys.executable

2011-11-14 Thread Éric Araujo
New submission from Éric Araujo : I wanted to know if sys.executable was always an absolute path but the doc does not talk about that. (My use case is that I’d like to reload a process and I wonder if I can call os.execve or if I need to use os.execvpe.) -- assignee: docs@python compo