<type>documentation</type>
<domain>scripting</domain>
<id>api</id>
<title>Scripting API</title>
<date>$Date$</date>
<version>$Revision$</version>
<product>per+</product>

Wing's formal scripting API consists of several parts:

1) The contents of the ``wingapi.py`` file in ``src`` inside the ``Install Directory``
   listed in Wing's `About box <script:about-application>`__. Scripts gain access to the
   API with ``import wingapi``. See the `API Reference <ref:scripting/api-reference>`__
   for details or work directly with ``wingapi.py`` as described under *Auto-Completion
   and Integrated Documentation* in the `Scripting Example Tutorial
   <ref:scripting/example>`__.
   
2) The portions of the ``wingutils.datatype`` and ``guiutils.formbuilder`` modules that
   are documented in `Argument Collection <ref:scripting/arginfo>`__.

3) All of the `documented commands <ref:commands/index>`__ 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")``
   
4) All of the `documented preferences <ref:preferences/index>`__ which can be read and
   changed using ``GetPreference()`` and ``SetPreference()`` in ``wingapi.gApplication``.

5) 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.
