MCPcopy Create free account
hub / github.com/bspaans/python-mingus / attach

Method attach

mingus/midi/sequencer.py:92–98  ·  view source on GitHub ↗

Attach an object that should be notified of events. The object should have a notify(msg_type, param_dict) function.

(self, listener)

Source from the content-addressed store, hash-verified

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

Callers 1

setUpMethod · 0.80

Calls

no outgoing calls

Tested by 1

setUpMethod · 0.64