title: Can I make ipython exit from the calling code?
body: <p>I have some code like this:</p>
  
  <pre><code>form IPython import embed
  for item in my_item_list:
      embed()
  </code></pre>
  
  <p>If I then run this program with</p>
  
  <pre><code>python my_example_program.py
  </code></pre>
  
  <p>on the first iteration through the loop I get put into an ipython shell and can inspect <code>item</code> and the environment as I would like to.</p>
  
  <p>On quitting ipython the loop resumes and then I can inspect the next <code>item</code> and the environment as you would expect. </p>
  
  <p>Is there a way for me to quit this code from within ipython (so that I am returned to a shell prompt). in any way short of opening another shell and killing the process?</p>