how to load beautiful math expression of sympy in kivy textinput or label
from __future__ import division
from sympy import *
from kivy.uix.textinput import TextInput
from kivy.uix.button import Button
class MyApp(App):
def f(self):
x, y, z, t = symbols('x y z t')
k, m, n = symbols('k m n', integer=True)
f, g, h = symbols('f g h', cls=Function)
x = symbols('x')
a = Integral(cos(x)*exp(x), x)
c=Eq(a, a.doit())
init_printing(use_unicode=True)
pprint(c)
return c
def build(self):
return TextInput(text=str(self.f()).encode('utf-8'))
MyApp().run()