[Checkins] SVN: zope.etree/trunk/src/zope/etree/__init__.py Add
simple getEngine method for getting at the elementtree engine.
Michael Kerrin
michael.kerrin at openapp.biz
Wed Apr 4 14:13:17 EDT 2007
Log message for revision 74009:
Add simple getEngine method for getting at the elementtree engine.
Changed:
U zope.etree/trunk/src/zope/etree/__init__.py
-=-
Modified: zope.etree/trunk/src/zope/etree/__init__.py
===================================================================
--- zope.etree/trunk/src/zope/etree/__init__.py 2007-04-04 18:07:15 UTC (rev 74008)
+++ zope.etree/trunk/src/zope/etree/__init__.py 2007-04-04 18:13:17 UTC (rev 74009)
@@ -15,3 +15,13 @@
$Id$
"""
+
+import zope.component
+from interfaces import IEtree
+
+_utility = None
+def getEngine():
+ global _utility
+ if _utility is None:
+ _utility = zope.component.getUtility(IEtree)
+ return _utility
More information about the Checkins
mailing list