[Python-projects] PyLint: Bogus message "Unable to import"
Sylvain Thénault
sylvain.thenault at logilab.fr
Thu Jul 6 18:10:21 CEST 2006
On Wednesday 05 July ? 10:41, Markus Meyer wrote:
> Alexandre,
>
> Alexandre Fayolle schrieb:
> > It is not a bug, it is a feature. Pylint does not take into account
> > changes to sys.path. Change your PYTHONPATH environment variable before
> > launching pylint, so that it is able to find the modules you import.
> >
> But it does take changes to sys.path into account when the form "import
> mylib" is used. It's only "from mylib import somemodule" that does not
> work. At best this is inconsistent behaviour.
nop, it neither take dynamic sys.path modification into account. I think the difference is that
when you do some thing like "from module import something", it tries to check that "something" is
actually in "module", while this is not done when you simply do "import module"
--
Sylvain Thénault LOGILAB, Paris (France)
Formations Python, Zope, Plone, Debian: http://www.logilab.fr/formations
Développement logiciel sur mesure: http://www.logilab.fr/services
Python et calcul scientifique: http://www.logilab.fr/science
More information about the Python-Projects
mailing list