Calling a Python function from HTML
simple answer: you can't. the code would have to be run client-side, and no browser would execute potentially malicious code automatically (and not every system has a python interpreter installed). 
the only thing you can execute client-side (without the user taking action, e.g. downloading a program or browser add-on) is javascript.
Im writing a webapplication, where im trying to display the connected USB devices. I found a Python function that does exactly what i want but i cant really figure out how to call the function from my HTML code, preferably on the click of a button.