[Zope-Checkins] CVS: Zope3/lib/python/Zope/Event - hooks.py:1.1.2.1
Steve Alexander
steve@cat-box.net
Sat, 23 Feb 2002 09:40:40 -0500
Update of /cvs-repository/Zope3/lib/python/Zope/Event
In directory cvs.zope.org:/tmp/cvs-serv4264
Added Files:
Tag: Zope-3x-branch
hooks.py
Log Message:
added hooks file for EventService
=== Added File Zope3/lib/python/Zope/Event/hooks.py ===
# This software is subject to the provisions of the Zope Public License,
# Version 1.1 (ZPL). A copy of the ZPL should accompany this distribution.
# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
# WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
# WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
# FOR A PARTICULAR PURPOSE.
"""Provide a hookable event service
"""
from EventService import EventService
def _clear():
# clear module-level data structures
global _eventService, publishEvent, subscribe, unsubscribe
_eventService = EventService()
publishEvent = _eventService.publishEvent
subscribe = _eventService.subscribe
unsubscribe = _eventService.unsubscribe
# set up module level data structures
_clear()
# Register our cleanup with Testing.CleanUp to make writing unit tests simpler.
from Zope.Testing.CleanUp import addCleanUp
addCleanUp(_clear)
del addCleanUp