M-x pdb is great while debugging. When the python process exits though, often there is a traceback left behind in the
gud buffer that I'd like to view using
compilation-mode so I can use
next-error to step through the stack frames.
I can always
M-x compilation-mode on python exit. Can I have emacs automatically do that for me?