Thanks Kyle! I've slightly updated the patch, because I had neglected to handle Python exceptions. If you haven't started yet, please consider the updated patch instead (it only differs by a few lines within org-babel-python--eval-tmpfile).