On 8/8/05, Fred Drake <[EMAIL PROTECTED]> wrote:
> On 8/8/05, Gary Poster <[EMAIL PROTECTED]> wrote:
> > Right.  As I perhaps only hinted in the proposal, it is impossible to
> > import _protections from zope.app.security, because of this in the
> > __init__:
> >
> > import _protections
> > _protections.protect()
> > del _protections
> 
> Depends on how you spell the import, unfortunately:
> 
>     >>> import zope.app.security._protections
>     >>> zope.app.security._protections
>     Traceback (most recent call last):
>       File "<stdin>", line 1, in ?
>     ImportError: cannot import name _protections

Argh, that's a copy/paste error.  Try this:

    >>> import zope.app.security._protections
    >>> from zope.app.security import _protections
    Traceback (most recent call last):
      File "<stdin>", line 1, in ?
    ImportError: cannot import name _protections

    >>> zope.app.security._protections
    Traceback (most recent call last):
      File "<stdin>", line 1, in ?
    AttributeError: 'module' object has no attribute '_protections'

    >>> from zope.app.security._protections import protect
    >>> protect
    <function protect at 0xb7a394c4>


  -Fred

-- 
Fred L. Drake, Jr.    <fdrake at gmail.com>
Zope Corporation
_______________________________________________
Zope3-dev mailing list
Zope3-dev@zope.org
Unsub: http://mail.zope.org/mailman/options/zope3-dev/archive%40mail-archive.com

Reply via email to