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

All Samples(14)  |  Call(4)  |  Derive(0)  |  Import(10)
D.copy() -> a shallow copy of D

src/z/o/Zope2-2.13.22/src/Products/PageTemplates/ZRPythonExpr.py   Zope2(Download)
 
from AccessControl import safe_builtins
from AccessControl.ZopeGuards import guarded_getattr, get_safe_globals
from RestrictedPython import compile_restricted_eval
from zope.tales.tales import CompilerError
from zope.tales.pythonexpr import PythonExpr
 
class PythonExpr(PythonExpr):
    _globals = get_safe_globals()

src/p/r/Products.PythonScripts-2.13.2/src/Products/PythonScripts/PythonScript.py   Products.PythonScripts(Download)
from AccessControl.SecurityInfo import ClassSecurityInfo
from AccessControl.SecurityManagement import getSecurityManager
from AccessControl.ZopeGuards import get_safe_globals, guarded_getattr
from AccessControl.ZopeGuards import get_safe_globals, guarded_getattr
from Acquisition import aq_parent
    def _newfun(self, code):
        g = get_safe_globals()
        g['_getattr_'] = guarded_getattr
        g['__debug__'] = __debug__
        # it doesn't really matter what __name__ is, *but*

src/z/o/Zope-HEAD/src/Products/PageTemplates/ZRPythonExpr.py   Zope(Download)
 
from AccessControl import safe_builtins
from AccessControl.ZopeGuards import guarded_getattr, get_safe_globals
from RestrictedPython import compile_restricted_eval
from zope.tales.tales import CompilerError
from zope.tales.pythonexpr import PythonExpr
 
class PythonExpr(PythonExpr):
    _globals = get_safe_globals()

src/e/n/enpraxis.educommons-4.1.2/enpraxis/educommons/tests/test_view_permissions.py   enpraxis.educommons(Download)
from Products.CMFCore.utils import _checkPermission as checkPerm
from AccessControl import ZopeGuards
from AccessControl.ZopeGuards import guarded_getattr, get_safe_globals
from AccessControl.ImplPython import ZopeSecurityPolicy
from AccessControl import Unauthorized

src/e/n/enpraxis.educommons-4.1.2/enpraxis/educommons/tests/test_object_workflow.py   enpraxis.educommons(Download)
from Products.CMFCore.utils import _checkPermission as checkPerm
from AccessControl import ZopeGuards
from AccessControl.ZopeGuards import guarded_getattr, get_safe_globals
from AccessControl.ImplPython import ZopeSecurityPolicy
from AccessControl import Unauthorized

src/e/n/enpraxis.educommons-4.1.2/enpraxis/educommons/tests/test_object_remove.py   enpraxis.educommons(Download)
from Products.CMFCore.utils import _checkPermission as checkPerm
from AccessControl import ZopeGuards
from AccessControl.ZopeGuards import guarded_getattr, get_safe_globals
from AccessControl.ImplPython import ZopeSecurityPolicy
from AccessControl import Unauthorized

src/e/n/enpraxis.educommons-4.1.2/enpraxis/educommons/tests/test_object_edit.py   enpraxis.educommons(Download)
from Products.CMFCore.utils import _checkPermission as checkPerm
from AccessControl import ZopeGuards
from AccessControl.ZopeGuards import guarded_getattr, get_safe_globals
from AccessControl.ImplPython import ZopeSecurityPolicy
from AccessControl import Unauthorized

src/a/c/AccessControl-3.0.8/src/AccessControl/tests/testZopeGuards.py   AccessControl(Download)
    def _compile_str(self, text, name):
        from RestrictedPython import compile_restricted
        from AccessControl.ZopeGuards import get_safe_globals, guarded_getattr
 
        code = compile_restricted(text, name, 'exec')
 
        g = get_safe_globals()
    def _compile(self, fname):
        from RestrictedPython import compile_restricted
        from AccessControl.ZopeGuards import get_safe_globals, guarded_getattr
 
        fn = os.path.join( _HERE, fname)