Re: [Pyobjc-dev] pth files in Resources
Brought to you by:
ronaldoussoren
From: Bob I. <bo...@re...> - 2003-02-10 21:52:08
|
On Monday, Feb 10, 2003, at 16:15 America/New_York, Bob Ippolito wrote: > In the project templates, __main__.py should have the following code: > > import sys, site > # preserve original length so we can reorder > lenPath = len(sys.path) > # scan for .pth files in Resources (current directory) > site.addsitedir('') > # reorder the path so we'll load stuff in the bundle before anything > in site-packages or elsewhere > sys.path[:] = sys.path[lenPath:] + sys.path[:lenPath] > > -bob actually, that should be site.addsitedir(sys.path[0]) .. |