[wingide-users] pylint environment

Aleh Arol aleh.arol at gmail.com
Sun Aug 26 16:18:17 MDT 2012


Thanks,
I see it, will double check, just to clarify - I'd like it to know my
custom python which has correct pythonpath compiled in already(that's
probably set_pypath=True does...). I'm not sure how it will do this
cause pylint cmd is a python executable which has #!/usr/bin/python in
it's top line...
for now I even got the core(_PyImport_LoadDynamicModule is the top
unserstandable symbol i see) when explicitly made pylint find my
extension modules by changing python path via pylint, if do nothing and
use env it doesn't crash. That's how I know it doesn't take the correct path

Ubuntu 12.04/pylint 0.25.0

26.08.2012 17:26, Wingware Support пишет:
> 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.
> 


-- 
Best regards,
Aleh Arol


More information about the wingide-users mailing list