[Zope] Random Module
Jim Abramson
jabramson at wgen.net
Thu Aug 25 13:42:05 EDT 2005
You can keep all the modules/types/etc you want Zope to stop hassling
you about into a single file, restart Zope, and enjoy life again.
create a Product called whatever you like (we called ours
'GlobalModules')...
our looks like this:
in Products/GlobalModules: __init__.py
# Global module assertions for Python scripts
from Products.PythonScripts.Utility import allow_module
from AccessControl import allow_module, allow_class, allow_type
allow_module('re')
import re
allow_type(type(re.compile('')))
allow_type(type(re.match('x','x')))
allow_module('zipfile')
import zipfile
allow_class(zipfile.ZipFile)
allow_class(zipfile.ZipInfo)
----END------
For you, obviously, you'll want to allow_module('random'), perhaps
declare some of its own special types, etc...
hth
Jim
> -----Original Message-----
> From: zope-bounces at zope.org [mailto:zope-bounces at zope.org] On
> Behalf Of Sam Boggess
> Sent: Thursday, August 25, 2005 1:36 PM
> To: zope at zope.org
> Subject: [Zope] Random Module
>
> Why won't Zope let me call the random module? It's really
> annoying to have to write an external method to call such a
> simple tool. Is there a way around this? Thanks.
> _______________________________________________
> Zope maillist - Zope at 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 )
>
>
More information about the Zope
mailing list