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.qPloneDropDownMenu-3.0/Products/qPloneDropDownMenu/__init__.py   Products.qPloneDropDownMenu(Download)
from AccessControl import allow_module
from Products.CMFCore.utils import ToolInit
 
from Products.qPloneDropDownMenu.DropDownMenuTool import DropDownMenuTool
from Products.qPloneDropDownMenu.config import PROJECT_NAME
 
allow_module('Products.qPloneDropDownMenu.utils')

src/p/r/Products.PDBDebugMode-1.3.1/Products/PDBDebugMode/__init__.py   Products.PDBDebugMode(Download)
 
    # Allow import of pdb in unprotected code
    AccessControl.allow_module('pdb')
    AccessControl.allow_module('ipdb')
 

src/p/r/Products.remember-1.9.3/Products/remember/__init__.py   Products.remember(Download)
import sys
 
from AccessControl import allow_module
from OFS.Image import Image
 
    pas_install.register_pas_plugin_class(context)
    # Some methods are needed in restricted python:
    allow_module('Products.remember.pas.utils')
 
    # Importing the content types allows for their registration

src/c/o/collective.contentlicensing-HEAD/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/c/o/collective.multilingualtools-0.1.2/src/collective/multilingualtools/__init__.py   collective.multilingualtools(Download)
def initialize(context):
    """Initializer called when used as a Zope 2 product."""
 
    from AccessControl import allow_module
    allow_module('collective.mutlinugualtools')

src/d/m/dm.zope.reseller-0.1dev1/dm/zope/reseller/__init__.py   dm.zope.reseller(Download)
# Copyright (C) 2014 by Dr. Dieter Maurer <dieter@handshake.de>
"""Zope 2 based reseller application."""
from AccessControl import allow_module
 
allow_module("Products.statusmessages.interfaces")

src/w/e/webcouturier.dropdownmenu-2.3.1/src/webcouturier/dropdownmenu/__init__.py   webcouturier.dropdownmenu(Download)
from AccessControl import allow_module
 
allow_module('webcouturier.dropdownmenu.utils')
 
 

src/p/r/Products.CacheSetup-1.2.1/Products/CacheSetup/__init__.py   Products.CacheSetup(Download)
import os.path
__version__ = open(os.path.join(__path__[0],'VERSION.txt')).read().strip()
 
from AccessControl import allow_module
 
        ).initialize(context)
 
    allow_module('Products.CacheSetup.config')
 
    # Ask Archetypes to handback all the type information needed

src/w/e/webcouturier.dropdownmenu-HEAD/src/webcouturier/dropdownmenu/__init__.py   webcouturier.dropdownmenu(Download)
from AccessControl import allow_module
 
allow_module('webcouturier.dropdownmenu.utils')
 
 

src/z/e/zettwerk.fullcalendar-0.3.1/zettwerk/fullcalendar/__init__.py   zettwerk.fullcalendar(Download)
 
 
from AccessControl import allow_module
allow_module('zettwerk.fullcalendar.browser.calendarview')
 

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