[wingide-users] PyLint on Save

Wingware Support support at wingware.com
Sat Aug 9 14:03:52 MDT 2008


Marcus.CM wrote:
> I found some snippets of discussion on this. I would want Pylint to be 
> executed whenever a module is saved.  This would iron out some typos and 
> undefined / name bugs
> that so frequently occurs when renaming / changing lines of codes.
> How can i do this, i am totally unfamiliar with the IDE extensions 
> scripting and i have tried things like "import pylintpanel" but it cant 
> find the  module path :-)
> 
> Any direction?

You would want to do something like the disabled example at the end
of scripts/editor_extensions.py, although you would probably want to
connect to the save-point signal instead of presave.  You don't need
to import pylintpanel, but instead would do this to kick off the
update:

wingapi.gApplication.ExecuteCommand('pylint-execute')

See the manual to learn more about scripting Wing, and refer to the
wingapi.py file in your Wing installation for the API.

-- 

Stephan Deibel
Wingware | Python IDE
Advancing Software Development

www.wingware.com



More information about the wingide-users mailing list