Using Wing IDE with GTK and PyGObject
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.
To get started using Wing, refer to the tutorial in the Help menu in Wing and/or the Wing IDE Quickstart Guide.
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 added to the Source Analysis > Advanced > Interface File Path in preferences. The parent directory of the generated gi package should be added; if the defaults are used, the directory to add is ~/.cache/fakegir.
Fakegir's README.md provides usage details.
Don't add the Fakedir produced package to the Python Path defined in Wing's Project Properties because code will not work if the fake module is actually on sys.path when importing any PyGObject-provided modules.
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.
Wing IDE provides many other options and tools. For more information: