Scripting and Extending Wing IDE


Home » Support » Index of All Documentation » Wing IDE Reference Manual »

Wing IDE provides an API that can be used to extend and enhance the IDE's functionality with scripts written in Python.

Simple scripts can be written without any extra tools -- Wing will find and load scripts at startup and reload them when they are edited within Wing IDE and saved to disk. The API Wing allows scripts access to the editor, debugger, project, and a range of application-level functionality. Scripts may also access all documented preferences and can issue any number of documented commands which implement functionality not duplicated in the formal Python API.

Scripts can be executed like any other command provided by Wing IDE. Scripts can add themselves to the editor and project context menus, or to new menus in the menu bar, and they can also register code for periodic execution as an idle event. They can also be bound to a key combination, or can be invoked by name using the Command by Name item in the Edit menu.

Errors encountered while loading or executing scripts are displayed in the Scripts channel of the Messages tool.

Scripts can optionally be designated as plugins, which allows the script to enable or disable itself as a whole when appropriate (for example, according to project contents or current editor file type), and allows the user to selectively enable or disable the script in the Tools menu.

More advanced scripting, including the ability to add tool panels, is also available but generally requires running a copy of Wing IDE from source code, so that scripts can be debugged more efficiently.

« 16. PyLint IntegrationTable of Contents17.0. Scripting Example »

Section Contents

17.0. Scripting Example
17.1. Getting Started
17.2. Script Syntax
17.3. Scripting API
17.4. Advanced Scripting