dasbus.signal module

class Signal[source]

Bases: object

Default representation of a signal.

connect(callback)[source]

Connect to a signal.

Parameters

callback – a function to register

disconnect(callback=None)[source]

Disconnect from a signal.

If no callback is specified, then all functions will be unregistered from the signal.

If the specified callback isn’t registered, do nothing.

Parameters

callback – a function to unregister or None

emit(*args, **kwargs)[source]

Emit a signal with the given arguments.