Created
July 18, 2012 04:41
-
-
Save timani/3134211 to your computer and use it in GitHub Desktop.
mod_python is not mod_php vs WSGI
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Unlike the PHP interpreter, the Python interpreter uses caching when executing files, so changes to a file will require the web server to be restarted. | |
Another problem is the basic concept – Apache starts child processes to handle the requests, and unfortunately every child process needs to load the whole Python interpreter even if it does not use it. | |
This makes the whole web server slower. Another problem is that, because mod_python is linked against a specific version of libpython, it is not possible to switch from an older version to a newer (e.g. 2.4 to 2.5) without recompiling mod_python. | |
mod_python is also bound to the Apache web server, so programs written for mod_python cannot easily run on other web servers. | |
These are the reasons why mod_python should be avoided when writing new programs. In some circumstances it still might be a good idea to use mod_python for deployment, but WSGI makes it possible to run WSGI programs under mod_python as well. | |
http://docs.python.org/howto/webservers.html |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment