FLASK - Running Python Scripts
Question: I have made a webpage using bootstrap which is hosted on a raspberry pi. What
I would like to do is to, when a certain button is clicked, is to run a python
script. This is all being hosted/run/accessed through a FLASK hosting service.

Thank you for your time.


Answer: [Run python method in HTML web
page](http://stackoverflow.com/questions/36713877/run-python-method-in-html-
web-page/37512973#37512973)

I also encountered same issue, and I solved it really easily using this way.
(I answered on my own question in that link)

Just redirect button to go any link let's say button , and then in flask
python file, make a method something like

    
    
    @app.route('/a')
    def b(name=None):
        import (python script that you want to import, it should be on same folder to do it easy)
        return render_template('xxx.html',name=name)
    

