Python
  Home arrow Python arrow Page 2 - A Brief Look at Mod_Python
Dev Shed Forums  
Administration  
AJAX  
Apache  
BrainDump  
DHTML  
Flash  
Java  
JavaScript  
Multimedia  
MySQL  
Oracle  
Perl  
PHP  
Practices  
Python  
Reviews  
Security  
Smartphone Development  
Style-Sheets  
Web Services  
XML  
Zend  
Zope  
Mobile Linux  
App Generation ROI  
IBM® developerWorks  
Forums Sitemap  
E-Commerce Hosting  
Linux Web Hosting  
Managed Hosting  
Small Business Hosting  
VPS Hosting  
Weekly Newsletter

 
Developer Updates  
Free Website Content 
 RSS  Articles
 RSS  Forums
 RSS  All Feeds
Write For Us Get Paid  
Request Media Kit
Contact Us  
Site Map  
Privacy Policy  
Support  
 USERNAME
 
 PASSWORD
 
 
  >>> SIGN UP!  
  Lost Password? 
Google.com  
PYTHON

A Brief Look at Mod_Python
By: Peyton McCullough
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: starstarstarstarstar / 20
    2005-04-25


    Table of Contents:
  • A Brief Look at Mod_Python
  • Installing Mod_Python
  • Getting Started
  • Creating Handlers and Working with the API
  • Python Server Pages

  • Rate this Article: Poor Best 
      ADD THIS ARTICLE TO:
      error-file:tidyout.log Del.ici.ous error-file:tidyout.log Digg
      error-file:tidyout.log Blink error-file:tidyout.log Simpy
      error-file:tidyout.log Google error-file:tidyout.log Spurl
      error-file:tidyout.log Y! MyWeb error-file:tidyout.log Furl
    Email Me Similar Content When Posted
    Add Developer Shed Article Feed To Your Site
    Email Article To Friend
    Print Version Of Article
    PDF Version Of Article

     
     
    ADVERTISEMENT


    A Brief Look at Mod_Python - Installing Mod_Python
    ( Page 2 of 5 )

    First, head on over to the mod_python website:

    http://modpython.org

    Download the latest version for your platform.

    To install mod_python on a Unix enviroment, you perform the usual ritual:

    $ ./configure
    $ make
    $ su
    # make install

    You may, however, need to help the configure script out a bit by pointing it to apxs (which is included with Apache and is needed to compile mod_python) or Python itself:

    $ ./configure -with apxs=/some/strange/place/apxs -with-python=/some/strange/place/apxs

    With Windows, things are easier. Although mod_python's official site no longer offers an easy installation option for Windows, a gentleman by the name of Nicolas Lehuen provides one on his website:

    http://www.lehuen.com/nicolas

    You can download it here:

    http://www.lehuen.com/nicolas/download

    Install it, and you're almost good to go.

    You'll then need to configure Apache (on either platform). Load  httpd.conf into your favorite text editor. Add this:

    LoadModule python_module libexec/mod_python.so

    If you used the Windows installer I mentioned, use this instead:

    LoadModule python_module modules/mod_python.so

    Failing both of those, try searching for the location of mod_python.

    We'll have to set mod_python as the handler for Python files. Add this to httpd.conf:

    AddHandler python-program .py

    Finally, we must give .htaccess a bit of power. Search httpd.conf for the string "AllowOverride" set it to "All." You should end up with this:

    AllowOverride All



     
     
    >>> More Python Articles          >>> More By Peyton McCullough
     

       

    PYTHON ARTICLES

    - Tuples and Other Python Object Types
    - The Dictionary Python Object Type
    - String and List Python Object Types
    - Introducing Python Object Types
    - Mobile Programming using PyS60: Advanced UI ...
    - Nested Functions in Python
    - Python Parameters, Functions and Arguments
    - Python Statements and Functions
    - Statements and Iterators in Python
    - Sequences and Sets in Python
    - Python Expressions and Operators
    - Dictionaries, Variables and Statements in Py...
    - Data Types in Python
    - The Python Language
    - SSH with Twisted





    © 2003-2009 by Developer Shed. All rights reserved. DS Cluster 2 Hosted by Hostway
    For more Enterprise Application Development news, visit eWeek