[Zope] I want to script in Python and not Zope-Python

Tres Seaver tseaver@palladion.com
Sun, 03 Jun 2001 12:54:37 -0400


tom smith <tom@othermedia.com> wrote:


> I'm a big fan of python AND zope, but I'm a little unclear about how the two
> really sit together.
> 
>  Is there any way to let python scripts to have access to all the bits and
> bobs I've got going with python, like MySQL (or Tk even) rather than have to
> deal with python-in-zope.
> 
> I basically just want to ..
> 
> import urllib
> 
> ...And don't want to muck about with external methods. I want FULL python
> power within zope.


Zope offers three levels of Python support:

  - Through-the-web code (DTML expressions, PythonScripts) have access to a
    restricted set of the Python library;  consider the potential for harm,
    for instance, in exposing the 'sys' or 'os' modules to untrusted users.

    You can selectively extend the modules exposed to TTW code 
(PythonScripts
    only in 2.3x;  all TTW code in 2.4) by "decorating" them with
    ModuleSecurityInformation assertions;  see the README in the 
PythonScript
    product for a how-to.

  - External methods have access to the full library, but can't create new
    persistent classes (because the pickling machinery won't be able to find
    them).

  - Filesystem-based Python produts are "da bomb";  they can do anything
    (including modify the set of modules visible to TTW code, perform hotfix
    patches to code in the Zope core, etc.).

Given your Pythonic bent, I recommend investigating the last option.

Tres.
-- 
===============================================================
Tres Seaver                                tseaver@digicool.com
Digital Creations     "Zope Dealers"       http://www.zope.org