[Patches] [ python-Patches-664376 ] sys.path[0] should contain absolute pathname
SourceForge.net
noreply@sourceforge.net
Fri, 10 Jan 2003 06:24:52 -0800
Patches item #664376, was opened at 2003-01-08 14:26
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=305470&aid=664376&group_id=5470
Category: None
Group: None
>Status: Open
Resolution: Accepted
Priority: 5
Submitted By: Thomas Heller (theller)
>Assigned to: Nobody/Anonymous (nobody)
Summary: sys.path[0] should contain absolute pathname
Initial Comment:
This patch changes sys.path[0] to contain an absolute
instead of a relative pathname.
See python-dev thread starting here:
http://mail.python.org/pipermail/python-dev/2003-
January/031896.html
----------------------------------------------------------------------
>Comment By: Thomas Heller (theller)
Date: 2003-01-10 15:24
Message:
Logged In: YES
user_id=11105
I believe this problem should be fixed also on systems other
than Windows, or the checkin should be reverted again.
I've prepared a patch based on an idea of Skip Montanaro,
who pointed my to the realpath() function.
It is tested on a SuSE 7.0 Linux system, but I don't know
which #ifdef I have to se around this code. See the patch
for details.
Reopened and unassigned for review.
----------------------------------------------------------------------
Comment By: Thomas Heller (theller)
Date: 2003-01-08 16:02
Message:
Logged In: YES
user_id=11105
Checked in as sysmodule.c, rev 2.112.
----------------------------------------------------------------------
Comment By: Guido van Rossum (gvanrossum)
Date: 2003-01-08 15:00
Message:
Logged In: YES
user_id=6380
Feel free to check this in.
----------------------------------------------------------------------
Comment By: Thomas Heller (theller)
Date: 2003-01-08 14:31
Message:
Logged In: YES
user_id=11105
The attached patch (sysmodule.diff) fixes the problem on
Windows - that's the only system where I can test it.
It leaves sys.argv alone and only changes sys.path[0] to an
absolute pathname.
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=305470&aid=664376&group_id=5470