On 31 janvier 19:21, Michael Rans wrote:
> Hi,

Hi,
 
> Replying to my own question: although it can be made to work on Windows by 
> keeping the bundled Python's DLLs folder and importing the libs and 
> site-packages of the desired external Python, it is not a good idea to run 
> Pylint this way because the caching of imports means that file changes are 
> not 
> recognised. 
> 
> Until Pylint stops doing real imports, the best way to run it from a Python 
> program is subprocess.

to clarify: pylint *doesn't* import the code, only when it has no choice.
Every python file with readable source isn't imported, the ast is built
from the source file. When source isn't available (only .pyc distributed, or 
C-compiled module), an ast is built from the living module, which hence has 
to be imported.

Then pylint retrieve asts through logilab.astng manager, which hold an astng
cache. It should be easy to invalidate entries from this cache on files changes
in an editor.

-- 
Sylvain Thénault                               LOGILAB, Paris (France)
Formations Python, Debian, Méth. Agiles: http://www.logilab.fr/formations
Développement logiciel sur mesure:       http://www.logilab.fr/services
CubicWeb, the semantic web framework:    http://www.cubicweb.org

_______________________________________________
Python-Projects mailing list
[email protected]
http://lists.logilab.org/mailman/listinfo/python-projects

Reply via email to