[wingide-users] PyLint Integration Script 1.1

Wingware Support support at wingware.com
Wed Mar 21 09:34:08 MDT 2007


Encolpe Degoute wrote:
> I'm trying to add 'PYTHONPATH' from Extensions preferences.
> After line 174 I add this code:
...
> I don't know how to debug it to be sure that python_path is the good one
> at runtime.

print python_path should send it to the Messages tool in the Scripts
channel.

> I don't know too if it's os.environ that I have to use here before the
> pylint execution.

Actually, it looks like we're using the startup environment in the
call that is used to start pylint (app.ExecuteCommandLine).  It looks
like AsyncExecuteCommmandLine() uses the env out of the project although
that won't do anything special for PYTHONPATH so will miss any entry
in your project properties's Python Path field.

Hmm, this code is a victim of oversimplification I think.

The thing to do for now is probably to ignore the Wing API for starting
this process and instead use popen2.  I'd say use subprocess but that's
not included in Wing's copy of Python (we probably need to stop pruning
the stdlibs, or at least include a few more commonly used ones that
don't happen to be used in our own code).

Either that or just set your PYTHONPATH before you start Wing... then
the pylint execution should pick it up.

Sorry this isn't cleaner...

-- 

Stephan Deibel
Wingware | Python IDE
Advancing Software Development

www.wingware.com



More information about the wingide-users mailing list