I wanted to make the re module accessible to Python Scripts on my site.

The instructions in the README.txt in the product directory specify that
you should place:

from Products.PythonScripts.Utility import allow_module
allow_module('re')

in a product __init__.py.  This appears to work fine for basic re
functions, however I wish to use the returned re.MatchObject objects,
and these raise an Unauthorized exception when methods are called. 
Reverting to the old __allow_access_to_unprotected_subobjects__ on re,
re.MatchObjects and re.RegexObjects appears to work however.

How is one supposed to expose that functionality to Python Scripts using
the new security features?  In the Utility.py is an allow_class method
as well, but I couldn't work out if that was what I needed.

thanks
-d

-- 
| Dyon Balding . Software Engineer . HiringTools.Monster.com
|   [EMAIL PROTECTED] . +1 415 288 3375

_______________________________________________
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope )

Reply via email to