Hello Gustavo.
First of all, thanks for your answer.
I am trying to send a mathematical expression readable by pyomo to another person. I have constructed it in Mathematica and then adapted it to Python's grammar as
savedXPython =
Import["savedWindX.txt"] //
StringReplace[#, {"[" -> "(", "]" -> ")",
"t" -> "m.lammda[i]*180/np.pi", "u" -> "m.phi[i]*180/np.pi"}] &
Since I want this to be executed without having to do any work on the file.
I have sent it as a txt but it seems that that is causing trouble.
That is why I am trying to convert the expression to a way that can be read using pyomo.
Regards.
Jaime.