Hi, I have written a Pylint plugin for Editra. Pylint runs much faster if I invoke it directly rather than via subprocess although it requires some hackery described here:http://stackoverflow.com/questions/2028268/invoking-pylint-programmatically/4803466#4803466
Editra is installed by p2exe or py2app, hence it has internally a bundled Python (2.6 at the moment). I can add to the path from the local Python install (which may be Python 2.7 or Python 2.5 for example) using sys.path.append the things required to run pylint and thescript pylint is to check eg. sys.path.append(“C:\Python25\Lib\site-packages\pylint-0.21.2-py2.5.egg”). 1. What will happen ifpylint-0.21.2-py2.5.egg orpylint-0.21.2-py2.7.egg runs through the Editra bundled Python (2.6)? Will there be compatibility issues? 2. To make it a valid check so that modules found in the Editra Python don’t affect the pylinting, I guess I could do: origsyspath = sys.path sys.path = [“C:\Python27\Lib”, “C:\Python27\Lib\site-packages\pylint-0.21.2-py2.7.egg” ...] pylint.lint ... sys.path = origsyspath Will the Python 2.6 bundled with Editra fall over with things from C:\Python27\Lib when pylint is run with the altered sys.path? You may be wondering why I don’t just invoke through subprocess. I have tried that, but there is some issue with path when launching pylint in a subprocess using py2app on Mac but not with py2exe on Windows. Also direct calling is much faster. Any help with my questions 1 and 2 above would be appreciated. Cheers, Mike
_______________________________________________ Python-Projects mailing list Python-Projects@lists.logilab.org http://lists.logilab.org/mailman/listinfo/python-projects