[mod_python] Translation handler help?

Gregory (Grisha) Trubetskoy grisha at modpython.org
Tue Jul 3 14:57:44 EST 2001

This is probably a screw up on my end - req.uri should be read only for
the translation handler to be useful... ;-)

It's not that hard to add that in - just look at how other read/write
variables are implemented - you have to put a couple of lines of code in
the set_attr function... If this is too much trouble, you 'll have to wait
until the next release.


On Tue, 3 Jul 2001, Sean True wrote:

> We're implementing a bunch of stuff on top of mod_python, and have avoided
> using the
> translation handler. Until today.
> I'd like to rewrite the URI -- but req.uri is readonly. I can't find a
> req.uri() method ...
> I'd like to find the equivalent of the CGI document root -- but
> apache.build_cgi_env() is not happy about running inside the transhandler():
> File /usr/local/pythonpackages/mod_python/apache.py", line 189, in Dispatch
>     result = object(self.req)
> File "/usr/local/pythonpackages/phtml/phtml.py", line 14, in transhandler
>     env = apache.build_cgi_env(req)
> File "/usr/local/pythonpackages/mod_python/apache.py", line 418, in
> build_cgi_env
>     env[k] = req.subprocess_env[k]
> Does anyone have a creative or even functional example of a translation
> handler?
> -- Sean
> -------
> Sean True
> WebReply.Com, Inc.

More information about the Mod_python mailing list