module search path

Jive Dadson sdfadfsa at sdfasdfasdfa.invalid
Tue Dec 17 22:06:51 EST 2002


Well, I've discovered a little bit more.

Python was reading the sys.path from the Microsoft Windows "registry".  That surprised me because I would have thought Pythoneers would consider the registry to be the embodiment of Pure Evil (which, by the way, it is).

I looked in the Python source code, thinking I would just read the algorithm that hunts for modules and all would be revealed.  Well... it's a bit convoluted.  It iterates through a table that's built by another routine somewhere.  Beyond that, who knows?  I quickly decided it would be easier and faster just to experiment by putting module files of the same name but various types and behavior here and there and observing which ones Python dredged up.  But I haven't done that yet.

However, I am back on the track.  Microsoft Windows 2000 and I have reached an uneasy truce.  It will let me replace my DLL whenever I want to, provided I don't map the drive it's on as a network drive.  That is a workable compromise that makes us both moderately happy.

Annow for something completely the same.  Back to draining the swamp ...

J.



More information about the Python-list mailing list