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
Add a folder called GlobalModules in your Products directory and put in
that folder a file called '__init__.py' with this content:
from Products.PythonScripts.Utility import allow_module
allow_module('types')
with this you can't use from types import * but you can use the second
form
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
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