Python scripts are limited to a subset of Python because they are considered a potential security problem. You can relax some of the restictions (mostly library limits)--see the comments in the PythonScript product. External Methods and Products, both Python based, do not have the limitations imposed on Python scripts because they require trusted access to the Zope system. External methods are simple to use; the interface into Zope needs to be limited to simple opbjects (lists, dictionaries, etc.). Products (with appropriate inheritance and mixins) don't have the limitatons of external methods and can define first-class objects that can be passed around. On 24 Apr 2003, Patrick W. Fraley wrote:
Hi List,
I am working on a project which will make use of a lot of python code. And I just ran accros a problem trying to use python OO within zope.
I created a python script: [...] but when I upload the files I get all kinds of errors about the __ things. [...] I looked at the Zope book, but it does not mention anything directly about this, it just say to obay the Zope programming rules. Now I can not imagine it not allowing to use OO-Code, so I must be doing something wrong.
Please help
Thanx Patrick --