8 Jan
2002
8 Jan
'02
10:27 p.m.
=?iso-8859-1?Q?Vicente_Castell=F3_Ferrer?= writes:
... global variables in External Method ... You can try Python's "global" directive:
def fun(...): global x ... x= ... The "global" directive tells Python that the variables belong to the module's namespace (and not the functions one). Be careful, however: In earlier Zope versions, at least until Zope 2.2, probably longer, the source files of External Methods have not been Python modules. Its variables have been thread local. This means, that different requests could see different values. I think, in Zope 2.4 and above, the files are standard Python modules but I am not sure. Dieter