I have a html page with text box and submit button. When somebody enters data in text box and click submit, i have to pass that value to a python script which does some operation and print output. Can someone let me now how to achieve this. I did some research on stackoverflow/google but nothing conclusive. I have python 2.7, Windows 10 and Apache tomcat. Any help would be greatly appreciated.
Thanks,
Jagadeesh.K
2
Answers
You need to use a python web-framework of some sort. I suggest giving Django project a try. It has a great tutorial.
Short answer: You can’t just run a python script in the clients browser. It doesn’t work that way.
If you want to execute some python when the user does something, you will have to run a web app like the other answer suggested.