joachim wrote at 2006-12-20 18:57 +0100: >I did a > >allow_type(type(set))
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"). -- Dieter _______________________________________________ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )