Ready to be published? LXer is read by around 350,000 individuals each month, and is an excellent place for you to publish your ideas, thoughts, reviews, complaints, etc. Do you have something to say to the Linux community?
Mention Common Gateway Interface scripting to a Web developer, and their first response is likely to be "I use Perl." While Perl has long dominated the CGI scripting world, there are other, and perhaps better, tools available. In this tutorial we'll take a look at CGI scripting with Python, a fast, versatile, multi-platform language. Python is an interpreted, object-oriented language named after the BBC television show "Monty Python's Flying Circus." No johnny-come-lately, Python's first release was in 1991. Developed by Guido van Rossum, Python is the scripting language of choice for many enterprises, including Google, NASA, and ForecastWatch.com.
Using CGI sucks because every page load starts an additional python process which isn't scalable. Don't do this in production... mod python runs in apache within the process as a DSO so is much more efficient.
From the site:
"Mod_python is an Apache module that embeds the Python interpreter within the server. With mod_python you can write web-based applications in Python that will run many times faster than traditional CGI and will have access to advanced features such as ability to retain database connections and other data between hits and access to Apache internals. A more detailed description of what mod_python can do is available in this O'Reilly article."
Persistent db connections is just one benefit.
-Viz
Post a comment
A free account is needed to post. Write your comment here first: your text is kept in this browser while you sign up or log in, and is waiting for you when you come back.
Your message:
|||||
10
Markdown: **bold**, *italic*, [text](https://link), - lists, > quotes, $x^2$ for math. Formatting help
Using CGI sucks because every page load starts an additional python process which isn't scalable. Don't do this in production... mod python runs in apache within the process as a DSO so is much more efficient.
From the site: "Mod_python is an Apache module that embeds the Python interpreter within the server. With mod_python you can write web-based applications in Python that will run many times faster than traditional CGI and will have access to advanced features such as ability to retain database connections and other data between hits and access to Apache internals. A more detailed description of what mod_python can do is available in this O'Reilly article."
Persistent db connections is just one benefit.
-Viz