BookRags.com Literature Guides Literature
Guides
Criticism & Essays Criticism &
Essays
Questions & Answers Questions &
Answers
Lesson Plans Lesson
Plans
My Bibliography Periodic Table U.S. Presidents Shakespeare Sonnet Shake-Up
Research Anything:        
History | Encyclopedias | Films | News | Create a Bibliography | More... Login | Register | Help
Not What You Meant?  There are 28 definitions for PSP.

Mod python

Print-Friendly
About 2 pages (435 words)

Bookmark and Share Know this topic well? Help others and get FREE products!
The title of this article should be mod_python. The initial letter is capitalized and an underscore is substituted or omitted because of technical restrictions.

mod_python is an Apache HTTP Server module that integrates the Python programming language into the Apache server. It is intended to replace Common Gateway Interface (CGI) as a method of executing Python scripts on a web server. The promised benefits are faster execution speed and maintaining data over multiple sessions.

Contents

Benefits

Ordinary CGI execution starts a new process every time a connection is made to a script on the server. This works well in low to medium traffic sites, but does not scale well when used on a high traffic site. There are methods of enhancing the performance of CGI, such as FastCGI, but it is often easier to use a specialized module to embed the desired language into the web server itself. This is exactly what mod_python is designed to do. Since the process is not terminated after the script execution like CGI, persistent data can be stored, such as database connections. This may reduce script execution overhead. Since mod_python modules are integrated with the web server, they can do almost anything an Apache module written in C can do: implement protocols besides HTTP, filter the request and response, determine a document's content type, etc. Another advantage to mod_python is that it can talk directly to Apache's core system, and interface as well as actually control the heart of Apache. This is done by handlers that the programmer specificies in the Apache configuration file, and every client request directed at that specific directory will not be processed by Apache, rather by mod_python and a "Main" function that handles all requests. Using mod_python also has the advantage of Python Server Pages (PSP), a way to embed Python code into HTML pages, similar to ASP, PHP, and JavaServer Pages (JSP).

History

First version of mod_python was released by Gregory Trubetskoy in 2000. In September of 2002 mod_python was donated to the Apache Software Foundation and became part of the Apache HTTP Server project.

See also

Free software Portal

External links

View More Summaries on Mod python
 
Ask any question on Mod python and get it answered FAST!
Answer questions in BookRags Q&A and earn points toward
discounted or even FREE Study Guides and other BookRags products!
Learn more about BookRags Q&A
Copyrights
Mod python from Wíkipedia. ©2006 by Wíkipedia. Licensed under the GNU Free Documentation License. View a list of authors or edit this article.

Article Navigation
Join BookRagslearn moreJoin BookRags




About BookRags | Customer Service | Report an Error | Terms of Use | Privacy Policy