[Zope] Newbie External Method - Python help

Thomas B. Passin tpassin@mitretek.org
Tue, 8 Jan 2002 16:56:20 -0500


I have never had a need to make the form variables "global" and I don't
think you need to either.  Just pass the variables you need as parameters to
the external method - or, better, just pass  REQUEST as a parameter.  If
your external method calls other functions, let it get the form data from
REQUEST and pass it to them.

That is, if your external method  is called spam(), you would use something
like

<dtml-var "spam(REQUEST)">

Cheers,

Tom P

[Vicente Castelló Ferrer]

I am trying to process some operations in a external method, becuase as far
as i know,  i can't import mysqldb in a python script due to security
restrictions.

Through a form I get the values of the variables and the action of the form
is the execution of the external method. The external method starts
comparing a value, so if it is equal to 'c' for example, other function
starts and so on.

The problem I have is that I would need to set the values of the form
variables as global, so any function inside the external method can access
to them. As I explicitly need to place a function name in Zope's external
method manage screen, I don't know how to set these variables as global.