[prev in list] [next in list] [prev in thread] [next in thread] 

List:       zope-dev
Subject:    Re: [Zope-dev] why cant i import types
From:       "Christopher N. Deckard" <chris () globalfoo ! net>
Date:       2003-08-18 14:31:35
[Download RAW message or body]

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 )
> 

_______________________________________________
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 )
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic