[wingide-users] PyLint Integration Script (Beta 3)

Wingware Support support at wingware.com
Thu Oct 5 07:19:55 MDT 2006

On Thu, 5 Oct 2006, Markus Meyer wrote:

> Hi Peter,
> yes, the script doesn't currently respect any project settings,
> including PYTHONPATH. If anyone knows how this can be done easily, feel
> free to tell me (or, ideally, submit a patch ;)....

Assuming you want to get at the Python Path set for the project 
as a whole (and not a particular file via File Properties) then
the magic through-the-formal-API incantation is:

  import wingapi
  from proj import attribs
  ignore, path = wingapi.gApplication.GetAttribute(attribs.kPyPath)[None]

Actually, this uses the scripting API except for the reference to 
the path attribute and although very unlikely to change nothing 
is set in stone yet with respect to that name or its contents.

If you happen to use $ENV$ environments vars in your path, you 
would need to expand those:

  from wingutils import textutils
  path = textutils.ExpandEnvVariables(path, wingapi.gApplication.GetProject().GetEnvironment())

Yes, we should add API calls to do this!

Stephan Deibel

Wing IDE for Python
Advancing Software Development


More information about the wingide-users mailing list