Look in lib/python/Products/PythonScripts/module_access_examples.py for how to define modules as safe. -Chris Fri, 15 Aug 2003 06:49:51 +0200, robert spoke forth:
For security reasons many of the standard libraries are not allowd to be used in Zope. Types is one of them. You can declare a library as save for use in a python script. How I can not say without consulting the documentation. Robert Am Friday 15 August 2003 04:18 schrieb Declan Shanaghy:
Can someone tell me why i cant import types into my python script in CMF? When i put either of the following lines as the first line of my script i get the error that follows
from types import * - produces Error Type: ImportError Error Value: "from types import *" is not allowed
from types import ListType - produces Error Type: ImportError Error Value: import of "ListType" from "types" is unauthorized. You are not allowed to access ListType in this context
_______________________________________________ Zope-Dev maillist - Zope-Dev@zope.org http://mail.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope )