On Tue, Feb 26, 2013 at 9:15 PM, Stefan <stefanvanz...@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?

> Most files in the code do a fair number of imports of each other (none
> lazy). Notably, the following files (which contain abstract classes) are
> used all the time by the code (LinearMatroid derives from
> BasisExchangeMatroid), but not imported by Sage:
>
> sage.matroids.matroid.pyx
> sage.matroids.basis_exchange_matroid.pyx
>
> I hope I am making a little sense; it's getting late here...
>
> --Stefan.
>
> --
> You received this message because you are subscribed to the Google Groups
> "sage-devel" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to sage-devel+unsubscr...@googlegroups.com.
> To post to this group, send email to sage-devel@googlegroups.com.
> Visit this group at http://groups.google.com/group/sage-devel?hl=en.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"sage-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-devel+unsubscr...@googlegroups.com.
To post to this group, send email to sage-devel@googlegroups.com.
Visit this group at http://groups.google.com/group/sage-devel?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to