I try to use the Wolfram Python client library to evaluate a differential equation in Python.
This does not work smoothly, but using
from wolframclient.evaluation import WolframLanguageSession from wolframclient.language import wl, wlexpr session = WolframLanguageSession() with WolframLanguageSession() as s: result = s.evaluate_wrap("TexForm[DSolve[y'[x] + y[x] == 0, y[x], x][[1, 1, 2]]]")
As you see, I already tried to bring DSolve into TexForm in this expression to be able to read it in Python.
But with using TexForm or without I get something like
(With TexForm) Global`TexForm[Times[Power[E, Times[-1, Global`x]], C]] (Without TexForm) Times[Power[E, Times[-1, Global`x]], C]
How can I bring that into a form, that I can use in Python, i.e. in sympy or even a LaTex String?