class documentation

class SignalHandler(object): (source)

View In Hierarchy

Wrapper for a signal handler method that allows blocking the handler for incoming signals. To be used as function decorator.

The method will be replaced by a BoundSignalHandler object that supports a blocked() method which returns a context manager to temporarily block a callback.

Intended to be used as:

        class Foo():

                @SignalHandler
                def on_changed(self):
                        ...

                def update(self):
                        with self.on_changed.blocked():
                                ... # do something that results in a "changed" signal
Method __get__ Undocumented
Method __init__ Undocumented
Instance Variable _func Undocumented
def __get__(self, instance, klass): (source)

Undocumented

def __init__(self, func): (source)

Undocumented

_func = (source)

Undocumented