On Tuesday 25 October 2011 12:02:18 Vicent Mas wrote:
> Hi,
> 
> I'm using pylint-0.25 with python-2.7 in a virtual environement
> created with virtualenv-1.6.4. I've a test file, test1.py, with the
> following content:
> 
> ----------------------------------------------------------------
> #!/usr/bin/env python
> 
> """This is a simple test"""
> 
> from distutils.core import setup
> 
> print setup
> ----------------------------------------------------------------
> 
> Running
> 
> (venv-2.7)$ python test1.py
> 
> works as expected. However pylint gives the following output
> 
> (venv-2.7)$ pylint test1.py
> 
> ************* Module test1
> F:  5,0: Unable to import 'distutils.core'
> E:  5,0: No name 'core' in module 'distutils'
> ...
> 
> and the code is rated at -6.67/10.
> 
> Is this a bug? How can I avoid this problem?

Strange, I don't reproduce and I get 10/10 on the sample code (running py2.6). 

A possible explanation could be that your pylint is running with another 
version of Python (for which distutils is not available). Could you please 
send the output of "pylint --version" here? 

-- 
Alexandre Fayolle                              LOGILAB, Paris (France)
Formations Python, Zope, Plone, Debian:  http://www.logilab.fr/formations
Développement logiciel sur mesure:       http://www.logilab.fr/services
Informatique scientifique:               http://www.logilab.fr/science
_______________________________________________
Python-Projects mailing list
[email protected]
http://lists.logilab.org/mailman/listinfo/python-projects

Reply via email to