A very (very very very very very...) simple python signal implementation, barely based on Qt signals.
This is not intended to be a drop-in replacement to pyqtSignal, but a lightweight (and limited) alternative.
See signalslot for a more robust and complete alternative.
- python 2.7
from ce import ConnectEmit
def abc(s, i):
print("ABC %s, %s" % (s, i))
def xyz(s, i):
print("XYZ %s, %s" % (s, i))
emitter = ConnectEmit(str, int, arguments=['s', 'i'])
emitter.connect(abc)
emitter.connect(xyz)
emitter.emit("123", 124)
This is a very (...) initial version, expect TODOs and XXXs and bugs along the code.
Also, the following are not currently supported (but are planned):
- diconnecting from function/methods
- connecting a ConnectEmit instance to another one (chaining)
- documentation
- tests
- python3 (should drop 2.7)