Mercurial > dotfiles
view unixSoft/bin/epylint @ 126:34b698771af9
emacs keybinding fixes
* Stop passing any keys through to the Mac layer
* M-shift-f is now textmate-find-in-project
* M-p bounces to matching paren (includes new elisp function to do that, is there a built in one?)
author | Augie Fackler <durin42@gmail.com> |
---|---|
date | Thu, 09 Jul 2009 13:32:06 -0500 |
parents | 7f67cf332537 |
children |
line wrap: on
line source
#!/usr/bin/env python import re import sys from subprocess import Popen, PIPE p = Popen("pylint -f parseable -r n --disable-msg-cat=C,R %s" % sys.argv[1], shell = True, stdout = PIPE).stdout for line in p.readlines(): match = re.search("\\[([WE])(, (.+?))?\\]", line) if match: kind = match.group(1) func = match.group(3) if kind == "W": msg = "Warning" else: msg = "Error" if func: line = re.sub("\\[([WE])(, (.+?))?\\]", "%s (%s):" % (msg, func), line) else: line = re.sub("\\[([WE])?\\]", "%s:" % msg, line) print line, p.close()