joachim wrote at 2006-12-20 18:57 +0100:
>I did a

This should be "allow_type(set)".

>in the __init__ of my product. But when I use it in a Python script I
>get global name 'set' is not defined.

Allowing a type does not automatically mean that it gets available
in the builtin namespace for untrusted code.

I would do the following:

   Define a module, say "importable", which imports all 
   objects you want to make available to untrusted code.

   Declare this module importable via "allow_module(importable)".

   Provide (e.g. in the module) all "allow_type" you want.

   Import your resources in your untrusted code.

An example of this approach is "Products.PythonScripts.standard").

Zope maillist  -
**   No cross posts or HTML encoding!  **
(Related lists - )

Reply via email to