Sorry I don't know the answer to this, but...

Are you saying that there are two passes in the sys.path resolution?

first pass: go through the sys.path elements and parse (execute)  
the .pth files
second pass: load things

Actually I suppose there is no "second pass" -- it's just that .pth  
files are executed *before* modules are loaded.

Is that right?

SO that modifying the order of sys.path elements works as expected?



On Nov 1, 2007, at 2:14 PM, Jack Jansen wrote:

> I put the following line (without indentation) into ~/Library/Python/
> 2.5/site-packages/HackPath.pth
>       import sys ; sys.path.insert(0, '/Users/jack/MyPythonPrependedPath')
> And, indeed, '/Users/jack/MyPythonPrependedPath' ends up as the first
> entry in sys.path.

_______________________________________________
Pythonmac-SIG maillist  -  Pythonmac-SIG@python.org
http://mail.python.org/mailman/listinfo/pythonmac-sig

Reply via email to