[Zope] How can I "from __future__ import nested_scopes" in python scripts?

Brian Lloyd brian@digicool.com
Tue, 26 Jun 2001 13:19:46 -0400


> I'm using Zope2.4 beta with Python 2.1 and I want to use the nest_scope
> functionality. However when I add the prerequisite statement:
> 
> from __future__ import nested_scopes
> 
> at the top of my python script it gives me an "ImportError" and
> "unauthorized" message.
> 
> By default the nested scopes are not included.
> 
> How do I this work?

One approach would be to create a Python "product". In 
lib/python/Products create a new directory with a single 
__init__.py file containing only:

from __future__ import nested_scopes

After restarting, nested scopes should be enabled.

Hope this helps!


Brian Lloyd        brian@digicool.com
Software Engineer  540.371.6909              
Digital Creations  http://www.digicool.com