Do they need to be human readable? If so, then str() or srepr() are the only ways to go. Be aware that neither handles assumptions correctly right now.
If not, I guess just use pickle, or dill if the objects aren't picklable. Aaron Meurer On Wed, Aug 14, 2013 at 10:56 AM, Ondřej Čertík <[email protected]> wrote: > Hi, > > What is the best way to store long expressions to a file, so that we > can read them later? The sympy.mechanics module takes a long time to > compute the expressions, so I don't want to be recalculating them over > and over again. > > I do however want to just play with the final (long) expressions. As > such, what do you think is the best format, so that we can robustly > read them later? > > Ondrej > > -- > You received this message because you are subscribed to the Google Groups > "sympy" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > To post to this group, send email to [email protected]. > Visit this group at http://groups.google.com/group/sympy. > For more options, visit https://groups.google.com/groups/opt_out. > > -- You received this message because you are subscribed to the Google Groups "sympy" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/sympy. For more options, visit https://groups.google.com/groups/opt_out.
