| Home | Trees | Index | Help |
|
|---|
| Package aquarium :: Package wsadaptor :: Module ModPythonAdaptor :: Class ModPythonAdaptor |
|
WebServerAdaptor --+
|
ModPythonAdaptor
This subclass of WebServerAdaptor is for mod_python.
There are many ways to configure mod_python. In the example below, any request for "/aquarium" is given to Aquarium. Note that this configuration even removes the need for a separate entry point:
<Location "/aquarium">
# Update your path, if necessary:
# PythonPath "sys.path + ['/path/to']"
SetHandler python-program
PythonHandler aquarium.wsadaptor.ModPythonAdaptor
PythonOption AQUARIUM_PACKAGE_PATH /var/www/site-packages
PythonDebug On
</Location>
Be careful if you are using SELinux. It can cause errors that look like Aquarium is not even installed! Keep an eye on both the server log and /var/log/messages if things aren't working.
The following urlscheme modules can be used with this Web server adaptor: QueryParameters, PathInfo.
The following attributes are used:
| Method Summary | |
|---|---|
Receive the request object. | |
Return CGI-like environmental variables. | |
Instantiate some cgi.FieldStorage and return the instance. | |
Set the Web server response code and message. | |
Output a string. | |
Output a list of header strings. | |
| Method Details |
|---|
__init__(self,
req)
|
getCgiEnv(self)Return CGI-like environmental variables. |
getForm(self)Instantiate some cgi.FieldStorage and return the instance. |
setResponseCode(self, code=None, _ModPythonAdaptor__ignored_msg=None)Set the Web server response code and message. Keword arguments:
|
write(self, s)Output a string. |
writeHeaders(self, headersList)Output a list of header strings. The list will contains tuples like:
("Content-type", "text/html")
|
| Home | Trees | Index | Help |
|
|---|
| Generated by Epydoc 2.1 on Mon Jan 1 16:34:19 2007 | http://epydoc.sf.net |