On 3/8/07, Gary S. Thompson <garyt@xxxxxxxxxxxxxxx> wrote:
Edward d'Auvergne wrote:
>On Tue, 2007-03-06 at 09:49 +0000, Chris MacRaild wrote:
>
>
>>On Tue, 2007-03-06 at 08:44 퍍㐙ꫲ S. Thompson wrote:
>>
>>
>>>Edward d'Auvergne wrote:
[ snip ]
>As for splitting up large modules such as the 66 method, 5701 line
>'specific_fns/model_free.py' file, I've been playing around with a few
>ideas. I have committed to the 1.3 repository line a change which does
>not affect program operation in any way but lays down a foundation for
>the breaking up of the model_free.py file
>(https://mail.gna.org/public/relax-commits/2007-03/msg00029.html). This
>change introduces the directory 'specific_fns/model_free/' while still
>retaining the module namespace of 'specific_fns.model_free' by using
>import statements in the directory's '__init__.py' file. I've borrowed
>this concept from the Python site-packages, especially the Numeric and
>scipy modules.
>
note numeric and scipy (especially) do carry some baggae and have code
bases which are known to be 'tricky'
This usage of __init__.py to populate the module corresponding to the
directory with objects and methods appears to be quite a standard
thing though. Looking again through the site-packages, other code
which uses this technique include pygtk, psyco, zope, twisted, Pyrex,
etc. Scientific Python doesn't use the technique and that would be
one of the most complicated packages for understanding it's data
structures and modules and what needs to be imported.
Edward