[ python-Bugs-932977 ] #!/usr/bin/python can find wrong python
SourceForge.net
noreply at sourceforge.net
Thu Apr 15 18:10:10 EDT 2004
Bugs item #932977, was opened at 2004-04-10 23:34
Message generated for change (Comment added) made by jackjansen
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=932977&group_id=5470
Category: Macintosh
Group: None
Status: Open
Resolution: None
Priority: 7
Submitted By: Jack Jansen (jackjansen)
Assigned to: Jack Jansen (jackjansen)
Summary: #!/usr/bin/python can find wrong python
Initial Comment:
It seems that in the event of a script run with #!/usr/bin/python
MacOSX will not pass a full pathname as argv[0], but only
"python".
When getpath.c notices this situation it looks over $PATH to try and
find python. But if it doesn't find the python from #!, or finds
another one first, it will use that python as the basis for its
sys.path setting.
The darwinports folks have a fix for this: <http://
www.opendarwin.org/pipermail/cvs-darwinports-all/2004-February/
023306.html>.
----------------------------------------------------------------------
>Comment By: Jack Jansen (jackjansen)
Date: 2004-04-16 00:10
Message:
Logged In: YES
user_id=45365
I think I agree that it is technically a darwin bug. But as a fix is available
(use another means to get the pathname of the current executable if
argv[0] seems bogus) I think we should put it in.
----------------------------------------------------------------------
Comment By: Martin v. Löwis (loewis)
Date: 2004-04-15 22:54
Message:
Logged In: YES
user_id=21627
Isn't that a Darwin bug?
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=932977&group_id=5470
More information about the Python-bugs-list
mailing list