I'm using embed() from IPython (console), to interact with my script. Whenever I press CTRL+D it exits the interactive mode and proceeds to the next commends following the embed() call.
How do I abort the complete python script avoiding it from going to further commands after embed() from the interactive python?
What I have tried:
CTRL+C : only cancels my current command in the IPython
CTRL+D : leaves the IPython and proceeds to the next commands in my script
Typing exit() : same as CTRL+D
Here is a sample script:
#!/usr/bin/env python
from IPython import embed
print 'hello world'
embed()
print 'I dont want to reach here if I decide to quit from the IPython terminal!'