I'm doing literate programming with Python. In my workflow I like to test the block with python-shell-send-buffer and ipdb debugger. However if the block contains a noweb reference then the code is not expanded when sent to the shell and causes syntax error.
Alternatively I can C-c C-c C-v (org-babel-expand-src-block) and get a read-only version of the buffer with noweb expanded and send this instead. This is not great for interactive work though.
Can I cause python-shell-send-buffer to call org-babel-expand-src-block beforehand, and maintain the noweb references in the C-c ' edit buffer?