I\'d like to programmatically exit a cell early in IPython Notebook. exit(0), however, kills the kernel.
Whats the proper way to do this? I\'d prefer n
This is far from "proper" but one way to exit early is to create a runtime error. So instead of returning early from a script cleanly with exit(0) one can return uncleanly with something like
print(variable_to_query)
() + 1
which will run the code up until this point (completing the print statement) and then fail.