Metadata-Version: 1.0
Name: Decovent
Version: 1.1.1
Summary: Python events rising and handling using decorators
Home-page: http://groups.google.com.au/group/decovent
Author: Adrian Cristea
Author-email: adrian.cristea@gmail.com 
License: MIT
Description: *Decovent* is a small Python library that allows an easy
        and elegant events rising and handling, using decorators.
        
        New in this version:
        * Private methods have been made public to facilitate inheritance
        
        Basic example:
        
        | ``from decovent import *         #required import``
        |
        | ``class Mouse(object):           #no special inheritance required``
        |   ``def __init__(self):``
        |       ``self.on_click()          #register handler (no arguments)``
        |
        |   ``@raise_event()               #raises event *click*``
        |   ``def click(self, x, y):``
        |       ``return (x, y)``
        |
        |   ``@raise_event()               #raises event *move*``
        |   ``def move(self, x, y): pass   #the event can be an empty method``
        |
        |   ``@set_handler('click')        #handles event *click*``
        |   ``def on_click(self, x, y):    #arguments will be sent by the event``
        |       ``return (x, y)``
        |
        | ``>> mouse = Mouse()             #the handler is registered``
        | ``>> e, h = mouse.click(10, 20)  #*click* event is raised and results``
        | ``>>                             #are returned as tuple in e and h``
        | ``>> mouse.move(30, 40)          #*move* event is raised, but unhandled``
        
        Features:
        * Decovent has been tested with Python's both productive versions,
        Python 2.6.4 and Python 3.1.1
        * events and handlers are tied to the local-thread
        * event name is case sensitive, Unicode safe and not required if it
        equals the decorated method name
        * for an event can be registered as many handlers as necessary
        * handlers are registered for (class, event) pair, to differentiate between
        events with similar names, but raised by different classes
        * a handler can be registered many times, but will be executed only once
        for (class, event) pair
        * handlers execution order is the same as the registration order
        * handlers are always executed in parallel threads, synchronous or
        asynchronous
        * parameters received by the handlers are being sent by the event
        * no arguments are required for a handler at registration time
        * a handler can be flagged to run only once for an event and then unregister
        itself
        * @classmethods can be raised as events or registered as handlers
        * events and handlers can be memoized at local or global level
        * events and handlers can be synchronized on the same lock
        * the time allocated for the execution of an event or handler is controllable
        * the number of methods that can be executed in parallel is controllable
        
        Restrictions:
        * events and handlers must be methods that belong to new-style classes
        * @staticmethods can't be raised as events or registered as handlers
        * one handler can be registered for only one event
        
        It's important to understand that events and handlers are not classes but
        decorated methods that may belong to any new style class. There are no
        restrictions on the class itself regarding inheritance or the interfaces
        that are implemented.
        
        Please see the documentation for the full list of features:
        http://packages.python.org/Decovent
        
Keywords: event raise handle decorator
Platform: UNKNOWN
Classifier: Development Status :: 5 - Production/Stable
Classifier: Environment :: MacOS X
Classifier: Environment :: Other Environment
Classifier: Environment :: Plugins
Classifier: Environment :: Web Environment
Classifier: Environment :: Win32 (MS Windows)
Classifier: Intended Audience :: Developers
Classifier: Intended Audience :: Education
Classifier: Intended Audience :: Information Technology
Classifier: Intended Audience :: Other Audience
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: MacOS
Classifier: Operating System :: Microsoft :: Windows
Classifier: Operating System :: OS/2
Classifier: Operating System :: OS Independent
Classifier: Operating System :: POSIX :: Linux
Classifier: Operating System :: Unix
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 2.6
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.0
Classifier: Programming Language :: Python :: 3.1
Classifier: Topic :: Education
Classifier: Topic :: Internet :: WWW/HTTP
Classifier: Topic :: Software Development
Classifier: Topic :: Software Development :: Libraries
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Classifier: Topic :: Utilities
