I'm interested in making a pretty basic Python webapp, literally just a form that takes in some input, calls a Python function on that input, receives results returned from that function, and then uses web development trickery to make them look pretty. I've seen numerous solutions using CherryPy, flask, bottle, web.py, all of which are great, but I haven't seen an example where any of those actually uses Apache. They all seem to be this all-in-one web server framework, which is totally overkill for me and not what I need. I already have Apache running here, so rather than start up a second web server and have to worry about keeping it running, I'd rather just have Apache serve my app along with everything else all day long.
We have the fairly standard http://myserver.com/~user/ setup with public_html
dirs in /home/user
, but for the life of me I can't figure out how to create a page that calls a Python function that is served up and has the Python code actually execute when browsing to http://myserver.com/~user/. Let's assume for the moment mod_python
or even mod_wsgi
is setup correctly...what do I need to do on my end? Do I need to call my script via a PHP exec()
, which to me defeats the need for mod_python
in the first place, or is there a more elegant solution (that actually uses mod_python
)?