views:

150

answers:

1

I have installed http://ftp.logilab.org/pub/pylint/pylint-0.18.1.tar.gz on Windows and now I am trying to configure my Emacs's flymake mode using epylint script. But it is not working. Here is the output of I got when I tried epylint on windows command prompt.

C:\>epylint test.py
'test.py':1: [F] No module named 'test.py'

Did anyone tried this? Any suggestion on how to fix the problem.

Thanks.

A: 

Reading the documentation of the epylint.lint function:

When run from emacs we will be in the directory of a file, and passed its filename. If this file is part of a package and is trying to import other modules from within its own package or another package rooted in a directory below it, pylint will classify it as a failed import.

To get around this, we traverse down the directory tree to find the root of the package this module is in. We then invoke pylint from this directory.

Finally, we must correct the filenames in the output generated by pylint so Emacs doesn't become confused (it will expect just the original filename, while pylint may extend it with extra directories if we've traversed down the tree)

It sounds like it has to do some extra magic to work within Emacs. It doesn't look like you can run it the same way from the command line.

Is it not working for you from within Emacs? It might be a bug in pylint then. Does pylint have a mailing list you can report issues to?

lost-theory
I have configured pylint on Emacs on Mac where it works perfectly. Here is the output of the same on Mac:~ $ epylint test.pytest.py:2: Warning: Unused import loggingtest.py:1: Warning: Unused import systest.py:1: Warning: Unused import osflymake takes output of epylint and then displays warning and error message on emacs. On Windows its neither working from Emacs nor from command line. I will post this issue to pylint mailing list as well.Thanks
Vijayendra Bapte
I have fixed the problem and e-mail the fix to pylint mailing list:http://lists.logilab.org/pipermail/python-projects/2009-September/002039.html
Vijayendra Bapte