What am I not understanding?
The following code works fine:
from sympy.printing.mathml import print_mathml
s = "x**2 + 8*x + 16"
print_mathml(s)
But this generates an error:
from sympy.printing.mathml import mathml
s = "x**2 + 8*x + 16"
print mathml(s)
Ultimately, what I'm trying to do is get "x**2 + 8*x + 16" converted into presentation MathML for output on the web. So my plan was to use the mathml() function on the string, then send the output through c2p, such as the following:
from sympy.printing.mathml import mathml
from sympy.utilities.mathml import c2p
s = "x**2 + 8*x + 16"
print(c2p(mathml(s))
But as stated, the mathml() function throws up an error.