On Thu, Aug 20, 2009 at 11:01 AM, Jason Grout<jason-s...@creativetrax.com> wrote: > > William Stein wrote: >> On Thu, Aug 20, 2009 at 2:18 AM, Nathann Cohen<nathann.co...@gmail.com> >> wrote: >>> Hello !!! >>> >>> Starting from a kind of troll related to the next-to-be tour for >>> Graphs in Sage ( I wanted to color the map of western europe, but the >>> majority of Sage's users do not live there ), I tried to build a graph >>> of the whole world by using your dear CIA's data ( available freely on >>> their website ) >>> >>> Do you think it would be interesting to add it to the graph generators >>> in Sage ? >> >> Yes. >> >>> It could be available as graphs.WorldMap() :-) >> >> Yes. >> >>> If so, I have a small problem : how to include it ? I generated it by >>> parsing again and again several files, then building the final graph >>> through Python, but the only way I have now to share this graph is to >>> write it by g.write(). >> >> Why not just include a pickle of it? Make sure there is a doctest >> that involves creating it, so that we can't release a version of Sage >> if this pickle breaks. >> >> And if you say you can't pickle it, then something is wrong with >> pickling graphs, and we have a bigger problem to worry about! >> >> In case you don't know, you can use pickle as follows: >> >> sage: save(G, 'g.sobj') >> sage: G = load('g.sobj') >> > > > Can we include binary data files with Sage? I thought for some reason > this was frowned upon.
It is frowned upon, but only if they can't easily be removed, and/or easily recreated from some text form. I've been meaning to add a script that takes an existing Sage tarball and makes a "clean" binary-free tarball. This would mean removing the pickle jar and all the hg repositories. > If we can include pickles, then I agree, pickling it would be the > easiest option. We already include hundreds of pickles in the pickle jar, which is used by doctesting to verify that new versions of sage don't break old pickles. -- 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 -~----------~----~----~----~------~----~------~--~---