Home » Support » Index of All Documentation » How-Tos » How-Tos for GUI Development »

Wing IDE is an integrated development environment that can be used to edit, test, and debug Python code that is written for GTK using PyGObject. Wing provides auto-completion, call tips, a powerful debugger, and many other features that help you write, navigate, and understand Python code.

For more information on Wing IDE see the product overview. If you do not already have Wing IDE installed, download a free trial now.

To get started using Wing, refer to the tutorial in the Help menu in Wing and/or the Wing IDE Quickstart Guide.

Auto-Completion

PyGObject uses lazy (on-demand) loading of functionality to speed up startup of applications that are based on it. This prevents Wing's analysis engine from inspecting PyGObject-wrapped APIs and thus the IDE fails to offer auto-completion.

To work around this, use Fakegir, which is a tool to build a fake Python package of PyGObject modules that can be placed onto the Python Path defined in Wing's Project Properties.

Fakegir's README.md provides usage details.

Since Wing uses the configured Python Path not just for the editor but also when debugging or executing code, it is necessary to remove the fake module directory from sys.path, if present, before importing any PyGObject-provided modules:

import sys, os
kFakegirCache = os.path.join(os.path.expanduser('~'), '.cache/fakegir/')
if kFakegirCache in sys.path:
  sys.path.remove(kFakegirCache)

Once this is done Wing should offer auto-completion for all PyGObject-provided modules and should be able to execute and debug your code without disruption.

Related Documents

Wing IDE provides many other options and tools. For more information:

« 3.1. Using Wing IDE with PyQtTable of Contents3.3. Using Wing IDE with PyGTK »

Using Wing IDE with GTK and PyGObject