Attach an object that should be notified of events. The object should have a notify(msg_type, param_dict) function.
(self, listener)
| 90 | pass |
| 91 | |
| 92 | def attach(self, listener): |
| 93 | """Attach an object that should be notified of events. |
| 94 | |
| 95 | The object should have a notify(msg_type, param_dict) function. |
| 96 | """ |
| 97 | if listener not in self.listeners: |
| 98 | self.listeners.append(listener) |
| 99 | |
| 100 | def detach(self, listener): |
| 101 | """Detach a listening object so that it won't receive any events |