[wingide-users] Wing2.0 plugin development
Wing IDE Support
support at wingware.com
Fri Oct 8 14:20:45 EDT 2004
On Fri, 8 Oct 2004, Adam Feuer wrote:
> I'm developing a plugin. I looked in the Wing source- scripts
> directory. There is an example there called 'example.py'... I have
> some very basic questions about this script...
> How do I install this script into a binary wing installation? I am
> running Mac and Windows Wing installations.
You drop it into the 'scripts' directory at the top level of the
installation or in 'scripts' in your user settings directory (which you
can see in the About box 5th item Settings Directory).
Wing scans these at startup and also will reload changed modules when you
save them to disk so you don't have to restart Wing when altering scripts.
It's reasonably forgiving if you save junk to disk but this hasn't been
heavily tested and it's subject to all the limitations of reloading
modules in Python if you're loading other modules and causing Wing to
hold onto references to old code objects (I think idle calls do work
properly, however, last I remember).
> How do I add a pop-down menu at the level of the File, Edit,
> Project, Source...Help menus? Is that at all possible?
For now I'd recommending copying src/guimgr/constants.py into your binary
installation in bin/2.3/src/guimgr and editing it to add the items you
want. The command name is the script name with underscores replaced by
dash (tho I believe that's optional). If you have questions about how
this file is used, just let me know.
We had a partial implementation to add menus by specifying where the
scripts wants to show up but that's been ripped out for the moment.
Hope that helps -- as noted before this is considered undocumented
alpha ware in 2.0.
Wing IDE for Python
Advancing Software Development
More information about the wingide-users