title: Is there a way to make python become interactive in the middle of a script?
body: <p>I'd like to do something like:</p>
  
  <pre><code>do lots of stuff to prepare a good environement
  become_interactive
  #wait for Ctrl-D
  automatically clean up
  </code></pre>
  
  <p>Is it possible with python?If not, do you see another way of doing the same thing?</p>