From dbb3782eed13cc1c8361f1265a64e113bd4a088b Mon Sep 17 00:00:00 2001 From: Sylvain Thenault Date: Wed, 3 Dec 2008 09:57:14 +0100 Subject: add epylint.bat script to fix Windows installation --- bin/epylint | 29 ++--------------------------- bin/epylint.bat | 16 ++++++++++++++++ 2 files changed, 18 insertions(+), 27 deletions(-) create mode 100644 bin/epylint.bat (limited to 'bin') 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 """ -- cgit v1.2.1