[Python-bugs-list] [ python-Bugs-433854 ] Wrong sys.path in weird situation

noreply@sourceforge.net noreply@sourceforge.net
Fri, 17 Aug 2001 10:33:47 -0700


Bugs item #433854, was opened at 2001-06-17 00:06
You can respond by visiting: 
http://sourceforge.net/tracker/?func=detail&atid=105470&aid=433854&group_id=5470

Category: Python Interpreter Core
Group: None
>Status: Closed
>Resolution: Wont Fix
>Priority: 3
Submitted By: Nicholas Riley (nriley)
>Assigned to: Guido van Rossum (gvanrossum)
Summary: Wrong sys.path in weird situation

Initial Comment:
I swear, this was my normal setup! :-)  Python 2.1 on IRIX 6.5.10.

% echo $PYTHONPATH
/home/reed/njriley/usr/lib/python2.1/site-packages
% echo $PATH
/home/reed/njriley/bin/sgi:/home/reed/njriley/bin:/usr/bin/X11:/usr/local/bin:/local/bin:/usr/dcs/software/unsupported/bin:/usr/bsd:/usr/sbin:/usr/bin:/bin:/usr/etc:/etc
% python
Python 2.1 (#2, Jun 17 2001, 01:43:04) [C] on irix6
Type "copyright", "credits" or "license" for more information.
>>> import sys; print sys.path
['', '/home/reed/njriley/usr/lib/python2.1/site-packages', '/home/reed/njriley/encap/python-2.1/lib/python2.1', '/home/reed/njriley/encap/python-2.1/lib/python2.1/plat-irix6', '/home/reed/njriley/encap/python-2.1/lib/python2.1/lib-tk', '/home/reed/njriley/encap/python-2.1/lib/python2.1/lib-dynload']
>>> ^D
% ls -d /home/reed/njriley/encap
gls: /home/reed/njriley/encap: No such file or directory

So, how did it get there?  This way:

lrwx--x--x   1 njriley  reed            7 Jun 17 01:55 bin -> usr/bin/
lrwxr-xr-x   1 njriley  reed           30 Jun 17 01:46 bin/python -> ../encap/python-2.1/bin/python*

If I replace ~/bin with ~/usr/bin in my PATH, everything is fine.  Python is trying to resolve the second symlink before resolving the first one, thereby causing a problem.

--Nicholas

----------------------------------------------------------------------

>Comment By: Guido van Rossum (gvanrossum)
Date: 2001-08-17 10:33

Message:
Logged In: YES 
user_id=6380

Wow.  I *think* I understand what's happening.

I don't think it's worth fixing though.

----------------------------------------------------------------------

You can respond by visiting: 
http://sourceforge.net/tracker/?func=detail&atid=105470&aid=433854&group_id=5470