[Pythonmac-SIG] Extensions for static versus frame

Jack Jansen Jack.Jansen@oratrix.com
Wed, 17 Jul 2002 23:18:33 +0200


On woensdag, juli 17, 2002, at 07:27 , Ronald Oussoren wrote:
> I like the idea. You could add something like the code below to
> a 'sitecustomize.py' somewhere on the default search-path:
>
> import sys
> import os.path
> ver = "%d.%d"%sys.version_info[:2]
>
> for top in (os.path.expanduser('~'), '', '/Network'):
>         p = os.path.join(top, 'Library/Application 
> Support/Python/lib/python')
>         sys.path.append(p)
>         sys.path.append(p + ver)

Good idea, but you should use macfs.FindFolder() to locate the 
specific folders.

And I think it's probably best if the Python installer didn't 
put this straight in sitecustomize.py, but in stead put it 
somewhere in Mac/Lib (addosxlibpath.py?) and suggest people add 
the single line "import addosxlibpath" to their sitecustomize.py.
--
- Jack Jansen        <Jack.Jansen@oratrix.com>        
http://www.cwi.nl/~jack -
- If I can't dance I don't want to be part of your revolution -- 
Emma Goldman -