Python Scripts: using the zip function
Does anyone handy with Python Scripts know how to use the built-in function zip, which was introduced in Python 2.0? I'm using Zope 2.3.1 with ActivePython 2.0 build 202 and if I run the python interpreter I get:
a = (1,2,3) b = (4,5,6) c = zip(a,b) print c [(1, 4), (2, 5), (3, 6)]
But if I try the same thing in a Python Script I get: Error Type: NameError Error Value: There is no variable named 'zip' Kevin Teague http://www.bud.ca
From: "Kevin Teague" <kevin@bud.ca>
Does anyone handy with Python Scripts know how to use the built-in function zip, which was introduced in Python 2.0?
Zope does not yet support Python 2.0, although it is known to work with it. You can expose builtins (such as zip) which are not currently available in Scripts by adding them to the long list in Products/PythonScripts/Guarded.py that starts with 'ArithmeticError'. Cheers, Evan @ digicool & 4-am
participants (2)
-
Evan Simpson -
Kevin Teague