Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

answered 11 years ago

Nathann gravatar image

Well, you would have to be more accurate about WHAT you want to store if you want to know how Sage can store it. There is a very general-purpose format that Sage supports though, but it will mostly be useful if you want to send a "Sage object" to another Sage user.

sage: # Build an object containing whatever you want to store
sage: a = [1, Graph(), Matrix(2,2)]
sage: save(a,"/tmp/my_sage_object.sobj")
sage: load("/tmp/my_sage_object.sobj")
[
                        [0 0]
1, Graph on 0 vertices, [0 0]
]
sage: one,my_graph,my_matrix = load("/tmp/my_sage_object.sobj")

That's a pretty cool feature if you want to store an object.

But if what you had in mind is "how can I exchange data with other persons or load their files", then you have to be much more specific.

Nathann