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.kupu-1.5.2/Products/kupu/__init__.py   Products.kupu(Download)
        return name in ('python')
 
    from AccessControl import allow_module
    allow_module('Products.kupu.python.nationalizer')
    allow_module('Products.kupu.python.spellcheck')

src/p/r/Products.PlacelessTranslationService-2.0.5/Products/PlacelessTranslationService/__init__.py   Products.PlacelessTranslationService(Download)
        return getattr(Products, '_registered_packages', ())
 
from AccessControl import ModuleSecurityInfo, allow_module
from AccessControl.Permissions import view
from OFS.Application import get_products
# set product-wide attrs for importing
security = ModuleSecurityInfo('Products.PlacelessTranslationService')
allow_module('Products.PlacelessTranslationService')
 
security.declarePrivate('os')

src/b/i/Bika-LIMS-HEAD/bika/lims/utils/__init__.py   Bika-LIMS(Download)
from time import time
from AccessControl import ModuleSecurityInfo, allow_module
from bika.lims import logger
from bika.lims.browser import BrowserView
from DateTime import DateTime
 
ModuleSecurityInfo('email.Utils').declarePublic('formataddr')
allow_module('csv')
 
 

src/b/i/bika.lims-3.01a/bika/lims/utils.py   bika.lims(Download)
from AccessControl import ModuleSecurityInfo, allow_module
from DateTime import DateTime
from Products.Archetypes.public import DisplayList
from Products.CMFCore.utils import getToolByName
from Products.ATContentTypes.utils import DT2dt,dt2DT
 
ModuleSecurityInfo('email.Utils').declarePublic('formataddr')
allow_module('csv')
 
def to_utf8(text):

src/e/a/easyshop.core-0.1a1/easyshop/core/__init__.py   easyshop.core(Download)
def initialize(context):
    """Initializer called when used as a Zope 2 product."""
    from AccessControl import allow_module
    allow_module('zope.component')
    allow_module('zope.event')
    allow_module("pdb")    

src/p/r/Products.FinanceFields-1.0/Products/FinanceFields/config.py   Products.FinanceFields(Download)
SKINS_DIR = 'skins'
 
from AccessControl import allow_module
allow_module('Products.FinanceFields.config')
allow_module('Products.FinanceFields.Money')

src/i/n/intranett-HEAD/src/intranett.policy/intranett/policy/__init__.py   intranett(Download)
    config.config.scan()
 
    from AccessControl import allow_module
    allow_module('intranett.policy.config')
 

src/p/r/Products.Formulator-1.15.5/Products/Formulator/__init__.py   Products.Formulator(Download)
from Products.Formulator import Errors
from Products.Formulator import EmailLinesField, InterfaceField
from AccessControl import allow_module
 
try:
 
# Allow Errors to be imported TTW
allow_module('Products.Formulator.Errors')
 
def initialize(context):

src/q/u/quintagroup.plonegooglesitemaps-1.8.2/quintagroup/plonegooglesitemaps/__init__.py   quintagroup.plonegooglesitemaps(Download)
from AccessControl import allow_module
 
allow_module('quintagroup.plonegooglesitemaps.utils.py')
allow_module('quintagroup.plonegooglesitemaps.config.py')
 

src/p/r/Products.PloneHelpCenter-4.0/Products/PloneHelpCenter/__init__.py   Products.PloneHelpCenter(Download)
from AccessControl import allow_module
from Products.Archetypes.public import process_types, listTypes
from Products.CMFCore import utils as CMFCoreUtils
from Products.CMFCore.DirectoryView import registerDirectory
import sys
def initialize(context):
 
    # Make the utils module importable TTW
    allow_module('Products.PloneHelpCenter.utils')
 

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