Say I have a python script with a runtime error:$ cat example.py  #! /usr/bin/env python3a = 1/0which gives:$ python3 example.py Traceback (most recent call last):  File example.py, line 3, in <module>    a = 1/0ZeroDivisionError: division by zeroI want Vim to jump to the problematic line of that file (line 3 in this case). I know Vim can do this because it works just fine for catching errors at compile time in C with gcc using :make and the quickfix window.Sure, I can populate Vim's quickfix window with :set makeprg=python3\ % and then :make, but it does not jump to the line number where the traceback points to. When I look in :copen it just highlights the first line of the trace, and I can't jump to the relevant line number.(I'm using Vim 7.4  on Debian jessie in case that matters.)My questions are:Can I configure Vim so that it knows how to get the relevant line number from a Python traceback?Can I modify the Python interpreter to spit out an error format that Vim already knows how to parse and get the relevant line number?
Quickfix support for Python tracebacks
quickfix;filetype python;makeprg
Vim comes with a set of compiler scripts, one of which is called pyunit.  If you run :compiler pyunit and then :make (with your suggested value for 'makeprg'), quickfix is populated as you expect.  However, it only works well if there's one level to the stack trace.Improving that compiler script would be a useful exercise.The unstack plugin may be of interest, as it provides a general mechanism to parse and view the locations reported in a stack trace and has Python support built in.