I have a "client" notebook that depends on an existing variable (expression) created elsewhere.

I have a test at the top to check whether that variable exists and is well conditioned as the first initialisation cell of the notebook that depends on that variable.

On loading and executing (potentially all) initialisation cells in the notebook I want to abort all subsequent evaluation of any further initialisation cells if the variable integrity test fails in a check in the first initialisation cell, without aborting the entire kernel.



Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.