I am loving my elpy setup in emacs, but I have one question. When I put in a ipdb.set_trace() for the ipython shell I want to send code snippets to the iPython shell. Right now my workaround is using the isend minor mode to highlight my code and send it to the iPython shell. The problem is that I kept getting IndentationError. Now, I can just put a %cpaste and -- before and after my highlighted code and hit control-enter to send it to the ipython shell and run it.
My question is, is there a way to write a wrapper around the isend command so that it automatically adds the %cpaste in front of the highlighted code, and a -- after it when sending it to the iPython shell?
I think it might even be a cool feature to add to the elpy package.