Hi,

I was trying to configure epylint on Emacs 23.1 on Windows but it was not
working fine.

I had to add following fixes to make it work. Please review them and add
them in your next release, if they are relevant.

*(1)  Fixed elisp/pylint-flymake.el*

--- pylint-flymake.el   2009-08-27 15:07:52.000000000 +0530
+++ pylint-flymake-modified.el  2009-09-23 14:11:10.000000000 +0530
@@ -1,6 +1,5 @@

 ;; Configure flymake for python
-(setq pylint "epylint")
 (when (load "flymake" t)
   (defun flymake-pylint-init ()
     (let* ((temp-file (flymake-init-create-temp-buffer-copy
@@ -8,7 +7,7 @@
            (local-file (file-relative-name
                         temp-file
                         (file-name-directory buffer-file-name))))
-      (list (expand-file-name pylint "") (list local-file))))
+      (list "epylint" (list local-file))))
   (add-to-list 'flymake-allowed-file-name-masks
                '("\\.py\\'" flymake-pylint-init)))

 *(2) Fixed epylint.py*

--- epylint.py  2009-08-27 15:07:53.000000000 +0530
+++ epylint-modified.py 2009-09-23 15:32:34.000000000 +0530
@@ -57,9 +57,8 @@ def lint(filename):
         parentPath = os.path.dirname(parentPath)

     # Start pylint
-    process = Popen("pylint -f parseable -r n --disable-msg-cat=CRI '%s'" %
-                    childPath, shell=True, stdout=PIPE, stderr=PIPE,
-                    cwd=parentPath)
+    process = Popen('pylint -f parseable -r n --disable-msg-cat=CRI "%s"' %
childPath
+                    , shell=True, stdout=PIPE, stderr=PIPE, cwd=parentPath)
     p = process.stdout

     # The parseable line format is '%(path)s:%(line)s: [%(sigle)s%(obj)s]
%(msg)s'


Thanks,
Vijayendra.
--- pylint-flymake.el	2009-08-27 15:07:52.000000000 +0530
+++ pylint-flymake-modified.el	2009-09-23 14:11:10.000000000 +0530
@@ -1,6 +1,5 @@
 
 ;; Configure flymake for python
-(setq pylint "epylint")
 (when (load "flymake" t)
   (defun flymake-pylint-init ()
     (let* ((temp-file (flymake-init-create-temp-buffer-copy
@@ -8,7 +7,7 @@
            (local-file (file-relative-name
                         temp-file
                         (file-name-directory buffer-file-name))))
-      (list (expand-file-name pylint "") (list local-file))))
+      (list "epylint" (list local-file))))
   (add-to-list 'flymake-allowed-file-name-masks
                '("\\.py\\'" flymake-pylint-init)))
 
--- epylint.py	2009-08-27 15:07:53.000000000 +0530
+++ epylint-modified.py	2009-09-23 15:32:34.000000000 +0530
@@ -57,9 +57,8 @@ def lint(filename):
         parentPath = os.path.dirname(parentPath)
 
     # Start pylint
-    process = Popen("pylint -f parseable -r n --disable-msg-cat=CRI '%s'" %
-                    childPath, shell=True, stdout=PIPE, stderr=PIPE,
-                    cwd=parentPath)
+    process = Popen('pylint -f parseable -r n --disable-msg-cat=CRI "%s"' % childPath
+                    , shell=True, stdout=PIPE, stderr=PIPE, cwd=parentPath)
     p = process.stdout
 
     # The parseable line format is '%(path)s:%(line)s: [%(sigle)s%(obj)s] %(msg)s'
_______________________________________________
Python-Projects mailing list
Python-Projects@lists.logilab.org
http://lists.logilab.org/mailman/listinfo/python-projects

Reply via email to