For the mechanics printers, str() might not be round trippable, since
they print the mechanics symbols like r and r' instead of r(t) and
Derivative(r(t), t). So srepr() would probably be better. But you
should double check that it does the right thing as well.

Another advantage with str or srepr is that they should work across
SymPy versions, or even git commits, whereas with pickle, who knows
what it will be using that might be dependent on the current
implementation. On the other hand, with pickle or dill, you don't have
to worry about how accurate the printers are.

Aaron Meurer


On Wed, Aug 14, 2013 at 1:10 PM, Ondřej Čertík <[email protected]> wrote:
> On Wed, Aug 14, 2013 at 12:31 PM, Aaron Meurer <[email protected]> wrote:
>> 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.
>
> I see, thanks. It helps if it is human readable, since I also want to load
> it into other programs, not necessarily written in Python.
>
>>
>> If not, I guess just use pickle, or dill if the objects aren't picklable.
>
> I see --- I could also then write a simple script, unpickle it, and
> then do whatever
> I need to do.
>
> Thanks!
>
> 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.

Reply via email to