On Tue, Feb 26, 2013 at 9:55 PM, Robert Bradshaw
<
robe...@math.washington.edu> wrote:
> On Tue, Feb 26, 2013 at 9:15 PM, Stefan <
stefan...@gmail.com> wrote:
>> Here's what I was trying to do (lazy version)
>>
>> In
sage.all.py:
>> ====
>> from sage.matroids.all import *
>>
>> In
sage.matroids.all.py:
>> ====
>> lazy_import('sage.matroids.importer', ['Matroid', 'matroids',
>> 'LinearMatroid', 'BasisMatroid', ...])
>>
>> In
sage.matroids.importer.py:
>> ====
>> from basis_matroid import BasisMatroid
>> from linear_matroid import LinearMatroid, ...
>> from constructor import Matroid
>> import matroids_catalog as matroids
>>
>> I somehow seemed to need the extra layer of 'importer.py' to make it work;
>> previously I just had the list of non-lazy import statements in all.py. Note
>> that everything imported into Sage is done lazily. I import classes
>> (LinearMatroid, BasisMatroid), functions (Matroid), and modules (matroids).
>> There's a mix of Python and Cython files.
>
> Were you perchance importing stuff from all itself?
E.g. sage/matroids/basis_exchange_matroid.pyx