Welcome, guest | Sign In | My Account | Store | Cart

Notice! PyPM is being replaced with the ActiveState Platform, which enhances PyPM’s build and deploy capabilities. Create your free Platform account to download ActivePython or customize Python with the packages you require and get automatic updates.

Download
ActivePython
INSTALL>
pypm install reflex-events

How to install Reflex-events

  1. Download and install ActivePython
  2. Open Command Prompt
  3. Type pypm install reflex-events
 Python 2.7Python 3.2Python 3.3
Windows (32-bit)
1.14 Available View build log
1.13 Available View build log
1.12 Available View build log
1.11 Available View build log
1.10 Available View build log
1.9 Available View build log
1.14 Available View build log
1.13 Available View build log
1.12 Available View build log
1.11 Available View build log
1.10 Available View build log
1.9 Available View build log
Windows (64-bit)
1.14 Available View build log
1.13 Available View build log
1.12 Available View build log
1.11 Available View build log
1.10 Available View build log
1.9 Available View build log
1.14 Available View build log
1.13 Available View build log
1.12 Available View build log
1.11 Available View build log
1.10 Available View build log
1.9 Available View build log
Mac OS X (10.5+)
1.14 Available View build log
1.13 Available View build log
1.12 Available View build log
1.11 Available View build log
1.10 Available View build log
1.9 Available View build log
1.14 Available View build log
1.13 Available View build log
1.12 Available View build log
1.11 Available View build log
1.10 Available View build log
1.9 Available View build log
Linux (32-bit)
1.14 Available View build log
1.13 Available View build log
1.12 Available View build log
1.11 Available View build log
1.10 Available View build log
1.9 Available View build log
1.14 Available View build log
1.13 Available View build log
1.12 Available View build log
1.11 Available View build log
1.10 Available View build log
1.9 Available View build log
Linux (64-bit)
1.14 Available View build log
1.13 Available View build log
1.12 Available View build log
1.11 Available View build log
1.10 Available View build log
1.9 Available View build log
1.14 Available View build log
1.13 Available View build log
1.12 Available View build log
1.11 Available View build log
1.10 Available View build log
1.9 Available View build log
1.14 Available View build log
 
Author
Lastest release
version 1.14 on Dec 11th, 2011

Reflex is an event system for applications made using Python.

The package provides a way for applications to manage events and event listeners, with little effort.

While the system is somewhat more complex than existing event systems, I feel it is more flexible, and more powerful.

Below is an example that hints at the capabilites of Reflex:

from reflex.data import Event
from reflex.control import EventManager
from reflex.interfaces import Reactor

class example(Reactor):

    name = 'example'

    def __inst__(self):
        self.bind(self.handler, 'basic', source='main')
        self.bind(self.use_args, 'args')

    def handler(self, event, *args):
        print("Hello, world!")

    def use_args(self, event, *args):
        print("Event triggered by {0} since because {1}.".format(event.source, args[0]))

events = EventManager()
obj = example(events)

# The following event trigger is not handled by anything.
events.trigger(Event('basic'))
# The next event trigger is handled by the handler method.
events.trigger(Event('basic', [('source', 'main')]))
# This one is yes.
events.trigger(Event('args', [('source', 'main')]), 'pickles')

Documentation and a package reference can be found at http://photofroggy.github.com/Reflex/index.html

The purpose of this package is to make creating an event driven plugin system for your application an effortless task. A full plugin system can created in just a few lines, as shown here:

from reflex.data import Event
from reflex.control import EventManager
from reflex.control import ReactorBattery
import plugins

# Create an event manager.
events = EventManager()

# Create a battery.
battery = ReactorBattery()
# Load our plugins.
battery.load_objects(events, plugins, 'Plugin')

# Plugins can now be accessed as such:
#   battery.loaded[plugin_name]
# Events can be fired as follows:
#   events.trigger(Event('my event'))
# Easy as pie!

The above example assumes your plugins are stored in a package called plugins.

Subscribe to package updates

Last updated Dec 11th, 2011

Download Stats

Last month:15

What does the lock icon mean?

Builds marked with a lock icon are only available via PyPM to users with a current ActivePython Business Edition subscription.

Need custom builds or support?

ActivePython Enterprise Edition guarantees priority access to technical support, indemnification, expert consulting and quality-assured language builds.

Plan on re-distributing ActivePython?

Get re-distribution rights and eliminate legal risks with ActivePython OEM Edition.