[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Emacs 23, Python, epylint, pylint
From: |
Richard Riley |
Subject: |
Emacs 23, Python, epylint, pylint |
Date: |
Thu, 22 Oct 2009 03:30:43 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/23.1 (gnu/linux) |
I have followed the advice here:
http://stackoverflow.com/questions/1259873/how-can-i-use-emacs-flymake-mode-for-python-with-pyflakes-and-pylint-checking-cod
or
http://tinyurl.com/yfshb5b
And successfully have pylint and emacs highlighting errors in my .py
files courtesy of flymake. The problem is that I can't see anywhere the
actually error description. Can anyone help please?
The epylint script I have is this:
,----
| #!/usr/bin/env python
|
| import re
| import sys
|
| from subprocess import *
|
| p = Popen(
| "pylint -f parseable -r n %s"%
| sys.argv[1], shell = True, stdout = PIPE).stdout
|
| for line in p:
| match = re.search("\\[([WECR])(, (.+?))?\\]", line)
| if match:
| kind = match.group(1)
| func = match.group(3)
|
| if kind in ["W","C","R"]:
| msg = "Warning"
| else:
| msg = "Error"
|
| if func:
| line = re.sub("\\[([WECR])(, (.+?))?\\]",
| "%s (%s):" % (msg, func), line)
| else:
| line = re.sub("\\[([WECR])?\\]", "%s:" % msg, line)
| print line,
|
| p.close()
`----
regards
r.
- Emacs 23, Python, epylint, pylint,
Richard Riley <=