[ZPT] REQUEST argument
Evan Simpson
evan@digicool.com
Thu, 7 Jun 2001 22:32:32 -0400
From: "Richard Jones" <richard@bizarsoftware.com.au>
> The method above (someMethod) is actually a Python Product method. It's
got a
> REQUEST argument. I was kinda hoping that ZPT could see that and pass in
the
> request argument for me when I have "here/someMethod"...
>
> Wishful thinking? As I noted in my original post,
> "python:here.someMethod(request)" appears in our ZPT a _lot_...
Yeeech! You want mapply! That's the magical apply function that the
publishing machinery uses, and while it makes a fine impedance matcher for
direct requests, I shudder to think of using it for intrasystem calls.
Can't you change your Product's method, or add a new one, so that you don't
have to pass REQUEST to it? You can always acquire it from self, as in:
def foo(self):
req = self.REQUEST
#whatever
Cheers,
Evan @ digicool