diff options
Diffstat (limited to 'bin')
-rwxr-xr-x | bin/epylint | 29 | ||||
-rw-r--r-- | bin/epylint.bat | 16 |
2 files changed, 18 insertions, 27 deletions
diff --git a/bin/epylint b/bin/epylint index a133c43..4aad657 100755 --- a/bin/epylint +++ b/bin/epylint @@ -1,28 +1,3 @@ #!/usr/bin/env python - -import re -import sys - -from popen2 import popen3 - -p, _in, _err = popen3("pylint -f parseable -r n --disable-msg-cat=C,R,I %s" % sys.argv[1]) - -for line in p: - 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() +from pylint import epylint +epylint.Run() diff --git a/bin/epylint.bat b/bin/epylint.bat new file mode 100644 index 0000000..a506782 --- /dev/null +++ b/bin/epylint.bat @@ -0,0 +1,16 @@ +@echo off +rem = """-*-Python-*- script +rem -------------------- DOS section -------------------- +rem You could set PYTHONPATH or TK environment variables here +python -x "%~f0" %* +goto exit + +""" +# -------------------- Python section -------------------- +from pylint import epylint +epylint.Run() + + +DosExitLabel = """ +:exit +rem """ |