BaseConduit.enabled

BaseConduit.enabled()[source]

Create a context for the conduit with automatic enabling and disabling.

Yields

None

Notes

The conduit is automatically enabled when the context is entered, and is guaranteed to be disabled when the context is exited, even when an error occurs during the execution of the code in the context.

Examples

with conduit.enabled():
    for i in range(10):
        conduit.redraw(k=1)