I recently started using emacs to code in Python. I currently prefer to use python mode (defined in python.el) alongside ansi-term for the python interactive shell. I'm trying to change the behavior of C-c C-c in python mode so it sends the buffer into ansi-term to be executed. That is, I'd like it to act as if I wrote 'execfile([current .py file i'm working on])' in the ansi-term.
Is there a way to do this? If not specifically through C-c C-c, with some other shortcut/method?