On Fri, Aug 21, 2009 at 4:49 AM, Nathann Cohen <nathann.co...@gmail.com>wrote:

>
> Do you have any idea how it is possible to call the "load" function
> from graph_generators.py ?
> I cannot use "load" as the function is not defined yet, nor can I
> directly write :
>         return sage.structure.sage_object.load("graph_world.sobj")
>
> as sage is not defined at that time either...


You should *not* load the graph into memory when graph_generators.py is
being imported.  I'm glad Sage doesn't let you do that, since it would be an
inefficient waste of memory and time to lod that graph every time Sage
starts up.

Just write code that is called only when the user actually types

   graphs.world***

which might cache its result if you want.

 -- William

--~--~---------~--~----~------------~-------~--~----~
To post to this group, send an email to sage-devel@googlegroups.com
To unsubscribe from this group, send an email to 
sage-devel-unsubscr...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/sage-devel
URLs: http://www.sagemath.org
-~----------~----~----~----~------~----~------~--~---

Reply via email to