Python
  Home arrow Python arrow CherryPy: Object-Oriented Web Developm...
Dev Shed Forums 
Administration  
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 
Dedicated Servers 
E-Commerce Hosting 
Linux Web Hosting 
Managed Hosting 
Small Business Hosting 
Download TestComplete 
VPS Hosting 
Weekly Newsletter

 
Developer Updates  
Free Website Content 
IBM Developerworks
 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

CherryPy: Object-Oriented Web Development
By: Peyton McCullough
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: 5 stars5 stars5 stars5 stars5 stars / 11
    2006-01-10

    Table of Contents:
  • CherryPy: Object-Oriented Web Development
  • A Simple Script
  • Expanding Your Application
  • Handling User Input

  • 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

    Route your faxes to your email inbox. Private, secure fax numbers available from CallWave. Choose your fax number.

    CherryPy: Object-Oriented Web Development
    (Page 1 of 4 )

    Python users who engage in web development may appreciate some CherryPy. It is an object-oriented web development framework that allows you to develop web applications easily. It can run on its own server, or behind Apache. Keep reading to learn more.

    Introducing CherryPy

    Web development is a task for which Python isn't especially popular, but the language still presents some interesting solutions for web development. Due to Python's simple syntax and extensive standard library, I also find web development a lot easier in Python. I like object-orientation just as much as the next guy (the next guy, of course, being a Python fan), though, so an object-orientated web development framework would certain be nice. CherryPy, “a pythonic, object-oriented web development framework,” aims to scratch the itch of web developers like me.

    CherryPy allows for easy development of web applications, whether they are small and focused or complex and broad. CherryPy runs on its own server, but it is relatively simple to run it behind Apache. Requests are mapped to objects within CherryPy applications –- which are executed on their own.

    Installation and Configuration

    The obvious first step in installing and configuring CherryPy is to download it. It may be downloaded from its website:

    http://cherrypy.org

    CherryPy merely needs to be unzipped and then installed in the usual fashion:

    python setup.py install

    Now, if you choose, you can configure CherryPy to run behind Apache. This is pretty simple to do. We'll start out simple and store our CherryPy files in the directory cherrytest, and we'll configure Apache to redirect all requests to this directory straight to CherryPy. To do this, add the following lines to httpd.conf:

    RewriteEngine On
    RewriteRule ^/cherrytest(.*) http://localhost:8080/$1 [P]

    More Python Articles
    More By Peyton McCullough


       · [i]Python users who engage in web development may appreciate some CherryPy. It is an...
     

       

    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 1 hosted by Hostway