I have a python file on my server. I want to run this file whenever user clicks submit button. Both my files .py and .html are in different directories. And I also cant use any framework
How to do this?
One option (as suggested by furas) is to use a python framework (Django, Flask, Bottle) on the backend to create an API server. You could equally do this in node with a call to
The other older method is to configure FastCGI on your webserver, which can automatically turn your python file into a url. Here are some stackoverflow answers for that method: