Wouldn't it be better to pass in self? As in: def my_method(self,REQUEST=None): '''my_method interpreting *REQUEST*.form.''' if REQUEST is None: REQUEST=self.REQUEST # safety_valve in case you forget to pass in REQUEST form= REQUEST.form # this is a dictionary containing form # variables and associated values ----- Original Message ----- From: "Dieter Maurer" <dieter@handshake.de> To: "Kini Natekar" <kininatekar@yahoo.com> Cc: <zope@zope.org> Sent: Wednesday, November 22, 2000 8:43 PM Subject: Re: [Zope] External Methods | Kini Natekar writes: | > I have got a html form which accepts an input from | > the user. This input has to be passed to a Python | > script, as a parameter, which is added as an external | > method in zope. | > Is there any way to do this ? | Your method: | | def my_method(REQUEST): | '''my_method interpreting *REQUEST*.form.''' | form= REQUEST.form # this is a dictionary containing form | # variables and associated values | ..... | | | If you like, you can directly use it as form action. | But probably, you will wrap it into a DTML method: | | DTML wrapper: | | ..... | <dtml-call "my_method(REQUEST)"> | ..... | | | Dieter | | | _______________________________________________ | Zope maillist - Zope@zope.org | http://lists.zope.org/mailman/listinfo/zope | ** No cross posts or HTML encoding! ** | (Related lists - | http://lists.zope.org/mailman/listinfo/zope-announce | http://lists.zope.org/mailman/listinfo/zope-dev )