SunQuest
 
       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  
Style-Sheets  
Web Services  
XML  
Zend  
Zope  
Forums Sitemap 
IBM® developerWorks 
Sun Developer Network 
Dedicated Servers 
E-Commerce Hosting 
Linux Web Hosting 
Managed Hosting 
Small Business Hosting 
Actuate Whitepapers 
VeriSign Whitepapers 
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? 
PYTHON

A Brief Look at Mod_Python
By: Peyton McCullough
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: 4 stars4 stars4 stars4 stars4 stars / 19
    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:
      Del.ici.ous Digg
      Blink Simpy
      Google Spurl
      Y! MyWeb 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

    Stay one step ahead of the competition. Evaluate and give feedback on some of the hottest web development tools on the market today. Make your opinion heard! Click Here

    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 source examples are wrongly formatted and so syntactically incorrect. Please...
       · The examples won't work, since the indentation has been lost. Hopefully the author...
       · We have changed the code samples to the proper indentation that the author provided....
       · I installed mod_python in my apache server but apache is not starting now. When I...
       · Nice Intro - thanx!The following example needed a <html> tag, due to Mime...
     

       

    PYTHON ARTICLES

    - SSH with Twisted
    - Mobile Programming in Python using PyS60: UI...
    - Python: Count on It
    - Python Strings: Spinning Yarns
    - Python: More Fun with Strings
    - Python: Stringing You Along
    - Python Operators
    - Bluetooth Programming in Python: Network Pro...
    - Python Sets
    - Python Conditionals, Lists, Dictionaries, an...
    - Python: Input and Variables
    - Introduction to Python Programming
    - Mobile Programming in Python using PyS60: Ge...
    - Bluetooth Programming using Python
    - Finishing the PyMailGUI Client: User Help To...





    © 2003-2008 by Developer Shed. All rights reserved. DS Cluster 4 hosted by Hostway