[Zope-dev] Need help mucking about with Products

Evan Simpson evan@tokenexchange.com
Sat, 4 Sep 1999 13:21:22 -0500


I've got a Zope 1.10.3 installation (to be Zope 2 Real Soon Now).  I like to
put certain functions (like tuple, map, list, and filter) into the standard
namespace '_'.  Up to now, I've patched DT_Utils to do this, but it's a
maintenance PITA.  I decided to try making a Product which would reach over
and insert the functions, but it doesn't seem to work.  It's just a
directory under Products containing the following code in '__init__.py'
(yes, there's an '__init__.pyc' too).

# MoreBuiltins/__init__.py
__doc__='''More Builtins Product Initialization'''
__version__='$Revision: 0.1 $'[11:-2]
classes=()
meta_types=()
methods={}
misc_={}
__ac_permissions__=()
from DocumentTemplate.DT_Utils import TemplateDict
d = TemplateDict.__dict__
# Test insertion
d['whizzo']='chocolate'

The Product appears in the Product management folder, but <!--#var
"_.whizzo"--> gives an AttributeError.

Help?