Scripting API

Index of All Documentation » Wing Pro Reference Manual » Scripting and Extending Wing »

Wing's formal scripting API consists of several parts:

  • The contents of the file in src inside the Install Directory listed in Wing's About box. Scripts gain access to the API with import wingapi. See the API Reference for details or work directly with as described under Auto-Completion and Integrated Documentation in the Scripting Example Tutorial.
  • The portions of the wingutils.datatype and guiutils.formbuilder modules that are documented in Argument Collection.
  • All of the documented commands which can be invoked using ExecuteCommand() in wingapi.gApplication. Keyword arguments can be passed to commands that take them, for example ExecuteCommand('replace-string', search_string="tset", replace_string="test")
  • All of the documented preferences which can be read and changed using GetPreference() and SetPreference() in wingapi.gApplication.
  • The standard library modules from Python.

Advanced scripts may also "reach through" the API into Wing internals. However, this requires reading Wing's source code and no guarantee is made that internals will remain unchanged or will change only in a backward compatible manner.