[Zope] Functions in a python script
Gilles Lenfant
glenfant@bigfoot.com
Mon, 23 Jul 2001 13:52:11 +0200
Hi,
I found a strange behaviour for a small script that runs correctly in pure
Python:
== SNIP ==
foo = 'a great text'
def bar():
# error below
return foo
return bar()
==/SNIP==
It makes a "NameError" on "foo" !!!
If the first line of bar() is "global foo", this does not change anything.
How to use python functions inside Zope python scripts ?
Is it reserved for External methods ?
Should I provide all "globals" as arguments to the function ?