[ANN] pylint-0.2

Peter Milliken peterm at resmed.com.au
Tue Sep 30 17:42:53 EDT 2003


Sorry mate, but I am in the same directory of the Python file I am trying to
run through pylint and I get the same message originally posted by Mark
Hahn.

So something is wrong - perhaps you should verify that what is on the
web-site is actually working as you expect?

Here is the full error message from one of my runs:

roebourne#1(~/swimming)$ python
c:/Python22/Lib/site-packages/logilab/pylint/lint.py roll.py
No config file found, using default configuration
Traceback (most recent call last):
  File "c:/Python22/Lib/site-packages/logilab/pylint/lint.py", line 529, in
?
    Run(*sys.argv[1:])
  File "c:/Python22/Lib/site-packages/logilab/pylint/lint.py", line 496, in
__init__
    modname = '.'.join(modpath_from_file(modname))
  File "c:\Python22\Lib\site-packages\logilab\common\modutils.py", line 70,
in modpath_from_file
    raise Exception('Unable to find module for %s in %s' % (
Exception: Unable to find module for c:\usr\local\swimming\roll in
c:\usr\local\swimming,
c:/Python22/Lib/site-packages/logilab/pylint,
c:\Python22,
c:\Python22\DLLs,
c:\Python22\Lib,
c:\Python22\Lib\lib-tk,
c:\usr\local\swimming,
c:\Python22\lib\site-packages,
c:\usr\local\share\emacs\site-lisp\pymacs
[exited with 1]

Note that I am running Python 2.2.2.

Peter

"Sylvain "Thénault"" <sylvain.thenault at logilab.fr> wrote in message
news:83ekxyii45.fsf at musca.logilab.fr...
> "Mark Hahn" <mark at hahnca.com> writes:
>
> > They not only feel no need to document, they also feel no need to follow
ANN
> > threads they start.
>
> Sorry, I don't have the time to follow c.l.py at the moment and that's
> just today that I've been informed about this thread.
>
> So, regarding the command line, pylint expects the name of a package
> or module as argument. As a convenience, you can give to it a file
> name if it's possible to guess a module name from the file's
> path, using the python path. Some examples :
>
> "pylint mymodule.py" should always works since the current working
> directory is automatically added on top  of the python path
>
> "pylint directory/mymodule.py" will work if "directory" is a python
> package (i.e. has an __init__.py file) or if "directory" is in the
> python path.
>
> "pylint /whatever/directory/mymodule.py" will work if either:
>   - "/whatever/directory" is in the python path
>   - your cwd is "/whatever/directory"
>   - "directory" is a python package and "/whatever" is in the python path
>   - "directory" is a python package and your cwd is "/whatever"
>   and so on...
>
>
> Regarding the lack of documentation, we're pretty busy at this time at
> logilab, but I hope we'll have the time to write some until the next
> release... Anyway, any contribution would be welcome ;)
>
>
> Hope that helps,
> regards
> --
> Sylvain Thénault                               LOGILAB, Paris (France).
>
> http://www.logilab.com   http://www.logilab.fr  http://www.logilab.org






More information about the Python-list mailing list