Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

If you want to parse strings in the way that the sage prompt does it, you could use

eval(preparse(k))

It's also a little wasteful to call

F(t)=eval(preparse(k))

(that's not valid python syntax. The preparser does quite a bit with that as well). In fact, if you know you want to parse the strings into symbolic expressions, you might want to call

F=symbolic_expression(k).function(t)

if you want F to be a function in t rather than just an expression.