So, as far as I understand it, when I M-x compile my python code, the Compilation buffer isn't really that easy to interact with as opposed to shell or ansi-term. So if I insert a pdb.set_trace() in my code, I can't debug in the Compilation buffer. However, what I do like about the Compilation buffer is that when I get the Traceback error I can navigate to all the problem files by just clicking or pressing enter on the referred problem files and even the line in said file.
I came across a blog post talking about enabling compilation-shell-minor-mode in the shell buffer, but that doesn't give me the ability to jump right to the offending file like I get when in the Compilation buffer. Is there any way I can enable that functionality in something like ansi-term? I say, ansi-term, because both the Compilation buffer and shell don't really work well with ipython's output for some reason.
EDIT: I added the code below, and now shell navigates the Traceback source code similar to the Compilation buffer. I believe it's the goto-address-mode that did the trick.
(add-hook 'shell-mode-hook 'compilation-shell-minor-mode)
(add-hook 'shell-mode-hook (lambda () (highlight-regexp "\\[OK\\]" "hi-green-b")))
(add-hook 'shell-mode-hook (lambda () (goto-address-mode )))
(require 'ansi-color)
(add-hook 'shell-mode-hook 'ansi-color-for-comint-mode-on)