- class shout.Message(*args, **kwargs)¶
Message s keep track of their listeners and the various rooms they are listening to. Instances of Message hold args and kwargs and when shout() is called these are passed to all the appropraite listeners. All return values of listeners are collected in response. If all listeners execute correctly success is set to True. Any Exception raised by a listener will halt the shout after binding exc to the offending Exception.
- args – Arguments to shout
- kwargs – Keyword Arguments to shout
- static create(name)¶
Dynamically create a new type of Message.
Parameters: name – The __class__.__name__ to use.
Sends the instances args and kwargs to the appropriate listeners.
- shout.shout(msg_type, *args, **kwargs)¶
A grammatically pleasant way to shout a Message.
shout(Message, “Hello”, inside=”A”) == Message(“Hello”, inside=”A”).shout()