[wingide-users] Scripting question

Markus Meyer meyer at mesw.de
Mon Jun 26 17:35:47 EDT 2006


I'm trying to write a simple PyLint integration for WingIDE (see
attachment). Right now, there is a panel "PyLint" where you can choose
"Update" in a right-click menu to run PyLint. The corresponding messages
from PyLint (Errors/Warnings/General Info like Metrics) will be shown in
different tabs. Note that this is a work in progress and in the current
form it isn't really useful, because everything is hardcoded. To be able
to finish this, I have a few questions:

* In line 314/315 of the script, the document is opened / reactivated
and then a goto-line command to the error-line reported by PyLint is

        doc = app.OpenDocument(self._lastFilename)
        doc.ExecuteCommand("goto-line", lineno=line)

However, this does not work. Is there any other / "the right" way to do

* I copied the GetVisualState/SetVisual state implementation from the
"templating.py" script in Wing's scripts/ directory. But why is this needed?

* Is there a preferred way to implement preferences with a script? Is
there an easy way to add a panel to the preferences dialog for settings?

* The "trees" shown inside the panels do not have a scroll bar for me
(Wing2.0 on Linux). I copied the corresponding UI creation code from
"templating.py". Is there a simple way to have scroll bars? Does that
mean that the template list in "templating.py" doesn't have a scrollbar,
too? (If yes, I'd consider this to be a bug in "templating.py") Why does
my "tree" not respond to scroll wheel scrolling? Are those properties of
the widget used?

* This is Wing2.0. Will I need to change many things when porting this
to Wing2.1 (since it says in the docs the API is not stable)?

Thanks in advance!

-------------- next part --------------
A non-text attachment was scrubbed...
Name: pylintpanel.py
Type: text/x-python
Size: 10396 bytes
Desc: not available
Url : /pipermail/wingide-users/attachments/20060626/b4fcdff4/pylintpanel.py

More information about the wingide-users mailing list