Currently I'm having some python files which connects to sqlite database for user inputs and then performs some calculations which sets the output of the program. I'm new to python web programming and I want to know what is the best method to use python on web?
Ex: I want to run my python files when the user clicks a button on the web page. Is it possible?
I started with Django. But it needs some time for the learning. And I also saw something called CgiScripts. Which option should I use? Please advice.
It probably would depend on what you want to do. I personally use CGI and it might be simpler if your inputs from the web page are simple, and it takes less time to learn. Here are some resources for it:
However you may still have to do some configuring to allow it to run the program instead of displaying it.
Here's a tutorial on that: http://httpd.apache.org/docs/current/howto/cgi.html
If your web server is apache you can use the http://modpython.org/ module in order to run your python CGI scripts.
For nginx you can use http://modwsgi.readthedocs.io/en/develop/
You can't run python directly
You may use this
http://karrigell.sourceforge.net/en/pythoninsidehtml.html
Or for inside php this
http://www.skulpt.org/