@contextmanager
def disconnected_from(signal, listener):
 signal.disconnect(listener)
 (yield)
 signal.connect(listener)

@ contextmanager def disconnected_from ( signal , listener ) : signal . disconnect ( listener ) ( yield ) signal . connect ( listener )
temporarily disconnect a single listener from a blinker signal .