[Pyobjc-dev] Re: sys.path strangeness
Brought to you by:
ronaldoussoren
From: ytrewq1 <yt...@gm...> - 2005-02-25 15:58:13
|
Further investigation revealed that the PYTHONPATH environment variable gets modified -- this explains the change in sys.path, but I don't understand why PYTHONPATH is changing... On Sat, 26 Feb 2005 00:23:48 +0900, ytrewq1 <yt...@gm...> wrote: > Under certain conditions sys.path becomes permanently modified in an > odd manner on my system (until I log out and log back in). Worse, the > site-packages directory is removed from sys.path so a bunch of stuff > becomes unavailable. > > As far as I can tell, this appears to happen sometimes after > loading/running code in some of my PyObjC plug-ins (they were built > using py2app). Unfortunately I don't have a reliable way of > reproducing the problem yet. > > FWIW, the directories which remain in sys.path (other than the initial ' ') are: > > /System/Library/Frameworks/Python.framework/Versions/2.3/lib/python23.zip > /System/Library/Frameworks/Python.framework/Versions/2.3/lib/python2.3 > /System/Library/Frameworks/Python.framework/Versions/2.3/lib/python2.3/plat-darwin > /System/Library/Frameworks/Python.framework/Versions/2.3/lib/python2.3/plat-mac > /System/Library/Frameworks/Python.framework/Versions/2.3/lib/python2.3/plat-mac/lib-scriptpackages > /System/Library/Frameworks/Python.framework/Versions/2.3/lib/python2.3/lib-tk > /System/Library/Frameworks/Python.framework/Versions/2.3/lib/python2.3/lib-dynload > > Under 'normal' conditions, my sys.path basically consists of a path to > Twisted before the python23.zip path and some paths including > site-packages after the lib-dynload path above. > > After the modification, everything before the python23.zip path and > everything after the last lib-dynload path are removed and a number of > paths within one of my plug-in bundles is prepended before the > python23.zip path. > > I was looking through Resources/site.py which lives in each of my > plug-in bundles and noticed a section which appears to modify > sys.path. I wonder if that could be related to what I'm > experiencing... > > I don't know if this is related, but I started noticing this behavior > after using the current installer for appscript -- moving the > installed files and directories away didn't seem to have any effect so > it may be unlrelated. > > Any help would be appreciated. > |