#!/usr/bin/env python """ This is a simple-minded CGI-based driver for the web API. $Header: /cvsroot/dbagg3/htdocs/api,v 1.5 2004/09/13 14:44:50 deusx Exp $ """ import os, sys from cStringIO import StringIO import cgiconfig from dbagg3.web import ui, Response import jon.cgi as cgi import jon.fcgi as fcgi class Handler(cgi.Handler): def process(self, req): ui.dispatch(req, Response(stdout=req)) # Need threading level 0 because of sour interaction with MySQL and SQLObject fcgi.Server({fcgi.FCGI_RESPONDER: Handler}, threading_level=0).run()