Python works well using CGI.
which is the simplest thing you can do: it only needs apache and the python working environment, and it is closest to the standard php setting.
remember that when using CGI, your python script is responsible for displaying the required HTTP headers ( sys.stdout.write('Content-Type: text/html\n\n') ), but there is a CGI module that is part of the python standard library which helps a lot with raw stuffs (generating post / get arguments, getting headers, generating headers).
Adrien plisson
source share