pytilities.event.restricteddispatcher — Pytilities v1.0.0 documentation

### Navigation

- index
- modules |
- next |
- previous |
- Pytilities v1.0.0 documentation »
- API documentation »
- pytilities »
- pytilities.event »

# pytilities.event.restricteddispatcher

class `pytilities.event.restricteddispatcher.` `RestrictedDispatcher`(dispatcher, allow=None, disallow=None)

  A restricted view of a Dispatcher

  The list of supported events is filtered.

  Check Dispatcher for the documentation of the methods that are left undocumented here.

  `__init__`(dispatcher, allow=None, disallow=None)

    Construct a restricted dispatcher.

    disallow and allow are mutually exclusive.

    Parameters:

    > dispatcher :: Dispatcher
    >   the dispatcher to wrap around
    > allow :: iter(string...):
    >   events that are allowed through
    > disallow :: iter(string...)
    >   events that are hidden/blocked

  `add_handler`(event_name, handler, owner=None)
  `dispatch`(event_name, *args, **keyword_args)
  `event`(event_name, owner=None)
  `has_event`(event_name)
  `remove_handler`(event_name, handler, owner=None)
  `remove_handlers`(event_name=None, owner=None)
  `__weakref__`

    list of weak references to the object (if defined)

  `events`

### Navigation

- index
- modules |
- next |
- previous |
- Pytilities v1.0.0 documentation »
- API documentation »
- pytilities »
- pytilities.event »