How can I embed a python file or code in HTML?
Thanks for the suggestions. What I have right now is a perfectly working python file containing jinja2 and the html output I want, but as a python file. When executing the corresponding html template, the curly expressions {{name}} are displayed like this, and not as the functions executed within the python file. Hence, I still have to somehow tell my main html file to execute this python script on my webpage, which I cannot manage so far.
Unfortunately, it seems that we are not allowed to use flask, only jinja and django.
I am working on an assignment and am stuck with the following problem:
I have to connect to an oracle database in Python to get information about a table, and display this information for each row in an .html-file. Hence, I have created a python file with doctype HTML and many many "print" statements, but am unable to embed this to my main html file. In the next step, I have created a jinja2 template, however this passes the html template data (incl. "{{ to be printed }}") to python and not the other way round. I want to have the code, which is executed in python, to be implemented on my main .html file.
I can't display my code here since it is an active assignment. I am just interested in general opinions on how to pass my statements from python (or the python file) into an html file. I can't find any information about this, only how to escape html with jinja. 
Any ideas how to achieve this?
Many thanks.