Message27120
Under certain conditions there is a difference between
Mac OS X and Linux (both 2.4.1) with regard to the
value of the variable sys.path[0] which should contain
the directory from which the script was called.
This difference appears when the script is called
through a symbolic link by a different user. See the
attached example. It should be executed once by the
owner of the TESTPATH directory:
~/TESTPATH/sub1/testpath.py
and
~/TESTPATH/sub2/testpath.py
In both cases, under Linux and Mac OS X, the result is:
/home/owner/TESTPATH/sub1
If a different user executes:
~owner/TESTPATH/sub1/testpath.py
and
~owner/TESTPATH/sub2/testpath.py
he gets the same results under Linux:
/home/owner/TESTPATH/sub1
but two different results under Mac OS:
/Users/owner/TESTPATH/sub1
and
/Users/owner/TESTPATH/sub2
This seems like a minor problem but it breaks my
application because sys.path[0] is the first place to
look for imports!
I am not sure whether this is a Python problem or
something to do with the Mac OS X. My Mac OS X version
is 10.4.3. |
|
Date |
User |
Action |
Args |
2007-08-23 14:36:53 | admin | link | issue1387483 messages |
2007-08-23 14:36:53 | admin | create | |
|