[Pythonmac-SIG] Extensions for static versus frame

Ronald Oussoren oussoren@cistron.nl
Wed, 17 Jul 2002 19:27:12 +0200


On Wednesday, July 17, 2002, at 11:17 , Michael Hudson wrote:

> Wouldn't it be nice if one could build a loadable bundle type thing
> that could be installed alongside the framework, or in
>
> /Library/Application Support/Python
>
> or somewhere?  This could include headers for e.g. Numeric.

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)

Ronald