|
Fri Jan 9 21:58:29 EST 2004
add_handler (htype, handler[, dir])
Allows dynamic handler registration. htype is a string containing the
name of any of the apache Python*Handler directives, e.g.
"PythonHandler". handler is a string containing the name of the module
and the handler function. Optional dir is a string containing the name of
the directory to be added to the pythonpath. If no directory is
specified, then, if there is already a handler of the same type
specified, its directory is inherited, otherwise the directory of the
presently executing handler is used.
However, if a PythonPath directive is in force, the third argument seems to
be ignored (from my reading of apache.py). Two solutions present themselves:
(a) fix the documentation or (b) change the code to suit the documentation.
For the record, I'd prefer the latter. It allows me to dynamically import
handlers directly instead of traversing long strings of Python packages.
Dustin
--
Dustin Mitchell
dustin at ywlcs.org
http://people.cs.uchicago.edu/~dustin/
|