Getting Started

James Gardner

November 18, 2004

© 2002-2004 James Gardner All rights reserved.


1 Getting Started

0.1 Overview

"It is better to have a flexible module that can be used intuitively than 
an all-singing, all-dancing framework that no-one can be bothered to learn."

- James Gardner

The Python Web Modules are a suite of simple and easy to use Python components desinged to allow developers to write Python CGI scripts or web applications with SQL databases, sessions and auth functions without having to install Web Application Servers.

A key part of the project is the creation of documentation and examples to allow developers with less time or expierince to understand the concepts of Python web programming without having to read all the sources and comments from the very beginning.

A Beginner's Guide to web programming with the modules is also available and there are a number of examples.

0.2 Required Software

To use all the features of the modules you will either need a binary distribution (available for Windows) or you will need to install the following software in addition to the source distribution of the web modules:

Python Imaging Library
MySQLdb Module
SQLite and pysqlite
libxml2, libxslt and the Python wrappers

All downloads including Windows versions are available from

0.3 Quick Installation

The Python Web Modules don't need installing although it is eaiest if you do install them. The only thing you must do is put the web module folder in a place where Python can find it or tell Python specifically where it is. You can do this in a number of ways:

  1. Easiest: Execute the command below to install the modules to your Python Lib/site-packages directory where Python looks for new modules:
    python install
  2. Place the web directory of the distribution in the same directory as the script which uses the modules since Python always searches the directory containing a script when looking for modules.
  3. Modify your PYTHONPATH by:

See Also:

Installing Python Modules
Howto document explaining how to install Python modules in general using distutils.

0.4 Further Options

To compile all the Python files for faster execution you can run the script in the scripts directory.

0.5 Testing the Examples

To get up and running with the examples run in the scripts directory to start a webserver on port 8080. There must be no spaces in the path to the file. Load a web browser and visit http://localhost:8080/doc/html/web/examples.html and you should see the examples page of the documentation. You don't need to install the modules to run the tests, they will run from the unzipped source directory.

0.6 Where Next

The next place to visit is the Beginner's Guide which will get you started programming web applications or the Module Reference which will give you detailed information on the API and way to use each of the modules or the Examples section to see the modules in action.

About this document ...

Getting Started, November 18, 2004

This document was generated using the tools distributed with Python 2.3

Comments and Questions

General comments and questions regarding this document should be sent by email to If you find specific errors in this document, either in the content or the presentation, please report the bug by emailing

For any of these channels, please be sure not to send HTML email. Thanks.

The authour of the web modules can be contacted at

This documentation is copyright James Gardner 2003-2004 All Rights Reserved. Permission is granted to freely distribute this documentation in electronic form. Commercial printing and distribution is forbidden but you are welcome to print single copies for your own use.

See About this document... for information on suggesting changes.