Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(209)  |  Call(123)  |  Derive(0)  |  Import(86)
Allow a module and all its contents to be used from a
restricted Script. The argument module_name may be a simple
or dotted module or package name. Note that if a package
path is given, all modules in the path will be available.

        def allow_module(module_name):
    """Allow a module and all its contents to be used from a
    restricted Script. The argument module_name may be a simple
    or dotted module or package name. Note that if a package
    path is given, all modules in the path will be available."""
    ModuleSecurityInfo(module_name).setDefaultAccess(1)
    dot = module_name.find('.')
    while dot > 0:
        ModuleSecurityInfo(module_name[:dot]).setDefaultAccess(1)
        dot = module_name.find('.', dot + 1)
        


src/p/r/Products.CompoundField-1.1/Products/CompoundField/__init__.py   Products.CompoundField(Download)
def initialize(context):
    """initialize product (called by zope)"""
    ##code-section custom-init-top #fill in your manual code here
    from AccessControl import allow_module
    allow_module('Products.CompoundField.utils')

src/c/o/collective.formcriteria-2.0/src/collective/formcriteria/__init__.py   collective.formcriteria(Download)
"""Add a form for user enterable search criteria to
collections/topic/smart folders."""
 
from AccessControl import allow_module
 
from Products.ATContentTypes import permission
 
allow_module('collective.formcriteria.columns.utils')
 
 

src/k/s/kss.core-1.6.5/kss/core/__init__.py   kss.core(Download)
else:
    # Allow API to build commands from restricted code
    from AccessControl import allow_module
    allow_module('kss.core.ttwapi')
 

src/q/u/quintagroup.plonecomments-4.1.9/quintagroup/plonecomments/__init__.py   quintagroup.plonecomments(Download)
from AccessControl import allow_module
 
# Feed our monkeys :-)
from quintagroup.plonecomments import patch
patch
allow_module('quintagroup.plonecomments.utils')

src/c/o/collective.gsa-2.0rc9/collective/gsa/__init__.py   collective.gsa(Download)
 
 
from AccessControl import allow_module
allow_module('collective.gsa.utils')
 

src/s/l/slc.linguatools-1.4.4/src/slc/linguatools/__init__.py   slc.linguatools(Download)
def initialize(context):
    """Initializer called when used as a Zope 2 product."""
 
    from AccessControl import allow_module
    allow_module('slc.linguatools')

src/p/r/Products.PloneServicesCenter-0.2.7/Products/PloneServicesCenter/content/country.py   Products.PloneServicesCenter(Download)
from AccessControl import allow_module
 
from Products.Archetypes import atapi
 
# BBB pake the ATCountry widget unpickleable
 
module = "Products.PloneServicesCenter.content.country"
allow_module(module)
 
countries = {

src/c/o/collective.contentlicensing-2.2.6/collective/contentlicensing/__init__.py   collective.contentlicensing(Download)
from config import GLOBALS
from Products.CMFCore.DirectoryView import registerDirectory
from AccessControl import allow_module
 
def initialize(context):
    pass
 
ContentLicensingMessageFactory = MessageFactory('ContentLicensing')
 
allow_module('collective.contentlicensing.ContentLicensingMessageFactory')

src/p/r/Products.PloneFilesZip-1.2.0b1/Products/PloneFilesZip/__init__.py   Products.PloneFilesZip(Download)
__docformat__ = 'restructuredtext'
 
from AccessControl import allow_module
from Products.CMFCore import utils
from Products.CMFCore.DirectoryView import registerDirectory
from config import *
import retrievers
 
# Configlet validation requires the "codecs" package
allow_module('codecs')

src/q/u/quintagroup.seoptimizer-4.3/quintagroup/seoptimizer/__init__.py   quintagroup.seoptimizer(Download)
from AccessControl import allow_module
from zope.i18nmessageid import MessageFactory
 
SeoptimizerMessageFactory = MessageFactory('quintagroup.seoptimizer')
 
allow_module('quintagroup.seoptimizer.util')

Previous  1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9  Next