callback

Cauldron.ktl.procedural.callback(service, keyword, *args, **kwargs) [edit on github]

Request that a callback function be invoked whenever a KTL broadcast is received for this keyword.

The callback function should accept as its sole argument a Keyword instance. If remove is set to False, the designated function will be removed from the set of active callbacks. If preferred is set to True, this callback will be remembered as a preferred callback, which gets invoked before all other non-preferred callbacks.

callback() is typically used in conjunction with monitor(), or poll() if the specific KTL keyword does not support broadcasts.