Variable: python-shell-compilation-regexp-alist
python-shell-compilation-regexp-alist is a customizable variable
defined in python.el.gz.
Value
(("^[ ]+File \"\\([^\"<]+\\)\", line \\([[:digit:]]+\\)" 1 2)
(" in file \\(.+\\) on line \\([[:digit:]]+\\)" 1 2)
("^> \\([^\"(<]+\\)(\\([[:digit:]]+\\))[^(]+()" 1 2))
Documentation
compilation-error-regexp-alist for inferior Python.
Source Code
;; Defined in /usr/src/emacs/lisp/progmodes/python.el.gz
(defcustom python-shell-compilation-regexp-alist
`((,(rx line-start (1+ (any " \t")) "File \""
(group (1+ (not (any "\"<")))) ; avoid `<stdin>' &c
"\", line " (group (1+ digit)))
1 2)
(,(rx " in file " (group (1+ not-newline)) " on line "
(group (1+ digit)))
1 2)
(,(rx line-start "> " (group (1+ (not (any "(\"<"))))
"(" (group (1+ digit)) ")" (1+ (not (any "("))) "()")
1 2))
"`compilation-error-regexp-alist' for inferior Python."
:type '(alist regexp)
:group 'python)