Hi there I'm a relative python/sympy newbie, and I need a little help on a problem. I'm writing a piece of code that translates a system of differential equations into either C, Python, or MATLAB/Octave code that can be interfaced to solvers in those languages. The models are specified using .ini files, and I'm using sympy's code generators to translate the model equations (which are in python syntax). So far so good.
What I want to be able to do, is take an expression like prefix = 'foo' str = 'x**2 - sin(x) + exp(xy)' and turn it into C (or MATLAB) like 'pow(foo_x, 2) - sin(foo_x) + exp(foo_x * foo_y)' I know this involves overriding the printing library somehow, but I'm getting confused with where to start. Should I be overriding the __str__ method of atom? Any help would be gratefully accepted Richard -- 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 sympy+unsubscr...@googlegroups.com. To post to this group, send email to sympy@googlegroups.com. Visit this group at http://groups.google.com/group/sympy. To view this discussion on the web visit https://groups.google.com/d/msgid/sympy/d4c5d051-d835-4a63-a966-191938935a2d%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.