Hugonweb | Apache Python

First, make sure apache and the script handling libraries are installed. On Ubuntu:

sudo apt-get install apache2 libapache2-mod-python libapache2-mod-fastcgi libapache2-mod-wsgi python-bobo

Then, make sure your script is executable by all

chmod a+x <scriptname.py>

Then, either in the .htaccess file, or in the global apache configuration, make sure the following lines are set

SetHandler wsgi-script
Options +ExecCGI

or

SetHandler cgi-script
Options +ExecCGI
SetEnv PYTHONPATH "pathyouwant"

Bobo can be installed in Ubuntu using the python-bobo package. To make bobo work with wsgi, you need to include the line:

application = bobo.Application(bobo_resources=__name__)