Follow

I would like to write some code behind GUI and have formatted document (which consists mostly of math expressions) as results of execution. My idea is: Python (backend), Qt5 (GUI) and Latex for building formatted documents. There are probably some libraries for Python-Latex interaction but do you know a better way to do this? Any ideas appreciated