title: drop into python interpreter while executing function
body: <p>i have a python module with a function:</p>
  
  <pre><code>def do_stuff(param1 = 'a'):
      if type(param1) == int:
          # enter python interpreter here
          do_something()
      else:
          do_something_else()
  </code></pre>
  
  <p>is there a way to drop into the command line interpreter where i have the comment?  so that if i run the following in python:</p>
  
  <pre><code>&gt;&gt;&gt; import my_module
  &gt;&gt;&gt; do_stuff(1)
  </code></pre>
  
  <p>i get my next prompt in the scope and context of where i have the comment in <code>do_stuff()</code>?</p>