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/e/n/enpraxis.staticsite-2.2/enpraxis/staticsite/__init__.py   enpraxis.staticsite(Download)
 
from zope.i18nmessageid import MessageFactory
from AccessControl import allow_module
 
def initialize(context):
    """Initializer called when used as a Zope 2 product."""
 
StaticSiteMessageFactory = MessageFactory('staticsite')
 
allow_module('enpraxis.staticsite.StaticSiteMessageFactory')

src/x/m/xm.theme-1.3/xm/theme/__init__.py   xm.theme(Download)
 
# Allow restricted Python to import the  module
from AccessControl import allow_module
allow_module('xm.theme')
 

src/c/o/collective.jaop-1.2/collective/jaop/__init__.py   collective.jaop(Download)
 
from zope.i18nmessageid import MessageFactory
from AccessControl import allow_module
 
 
OpenSearchMessageFactory = MessageFactory('opensearch')
 
allow_module('collective.jaop.OpenSearchMessageFactory')

src/e/n/enpraxis.wordpressexchange-1.2/enpraxis/wordpressexchange/__init__.py   enpraxis.wordpressexchange(Download)
from Products.CMFCore.DirectoryView import registerDirectory
from zope.i18nmessageid import MessageFactory
from AccessControl import allow_module
 
GLOBALS = globals()
 
WordPressMessageFactory = MessageFactory('wordpressexchange')
allow_module('enpraxis.wordpressexchange.WordPressMessageFactory')
 

src/p/r/Products.qRSS2Syndication-0.5.1/Products/qRSS2Syndication/__init__.py   Products.qRSS2Syndication(Download)
from AccessControl import allow_module
from Products.CMFCore.DirectoryView import registerDirectory, registerFileExtension
from config import GLOBALS
 
allow_module('Products.qRSS2Syndication.utils.py')

src/c/o/collective.zipfiletransport-3.2.3/collective/zipfiletransport/__init__.py   collective.zipfiletransport(Download)
    CustomizationPolicy = None
 
from AccessControl import allow_module
from App.Common import package_home
from Products.Archetypes import listTypes
 
ZipFileTransportMessageFactory = MessageFactory('ZipFileTransport')
allow_module('collective.zipfiletransport.ZipFileTransportMessageFactory')
 
import os, os.path

src/p/r/Products.Ienablesettrace-1.0/Products/Ienablesettrace/__init__.py   Products.Ienablesettrace(Download)
import AccessControl
AccessControl.allow_module('pdb')
AccessControl.allow_module('ipdb')
 

src/p/r/Products.Quaestrio-0.13.1/src/Products/Quaestrio/__init__.py   Products.Quaestrio(Download)
 
# Zope imports
from AccessControl import allow_module
 
# plone
def initialize(context):
 
    allow_module('Products.Quaestrio.utils')
 
    from Products.Quaestrio.content import Quaestrio_Quizz, Quaestrio_Question, Quaestrio_Score

src/p/r/Products.ManagableIndex-2.1.5/Products/ManagableIndex/__init__.py   Products.ManagableIndex(Download)
from PathIndex import PathIndex, addPathIndexForm
from ManagableIndex import addIndex, ManageManagableIndexes
from AccessControl import allow_module
 
_indexes= (
      )
 
allow_module('Products.ManagableIndex.Utils')
 

src/p/r/Products.FCKeditor-2.6.6.3/Products/FCKeditor/__init__.py   Products.FCKeditor(Download)
from config import *
 
from AccessControl import allow_module
 
global fckeditor_globals
def initialize(context):
    allow_module('Products.FCKeditor.utils')
    if INSTALL_DEMO_TYPES :
        initializeTypes(context)
 

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