[wingide-users] pylint environment

Wingware Support support at wingware.com
Sun Aug 26 08:26:26 MDT 2012

Aleh Arol wrote:
> I have a question: does pylint inherits project environment from the
> current active project? It seems no, because I have custom python
> interpreter set in my project and LD_LIBRARY_PATH overridden - I'm using
> a lot of C++ modules. So when I updating pylint for a file it says it
> can't import a C++ module, while in debug mode the program works.
> So, 1) Does it inherits env?
> 2) If not, then why?

It does use the environment set in the project properties.  See the code 
around line 464 in scripts/pylintpanel.py in your Wing installation.  
I'm guessing maybe your code sets up sys.path after it starts and you 
need to also add some Python Path in Project Properties (from the 
Project menu) to get pylint to find your modules.  I don't think 
LD_LIBRARY_PATH is relevant since pylint does not actually run your code 
and Python Path is what is used to find extension modules.  Any 
additional non-extension module C++ libraries that are loaded should be 
completely ignored by pylint whether run from inside or outside of Wing.

I just verified that PyLint 0.25.1 doesn't complain about importing 
extension modules if I've got the necessary path set up in the project.  
So I think it should indeed just be an environment issue and not pylint 
malfunctioning.  Still may be worth checking that your pylint version 
does this correctly when run from outside Wing IDE.


Stephan Deibel
Wingware | Python IDE
Advancing Software Development


More information about the wingide-users mailing list