22

I see from a lot of tutorials that in python the statement "from gi.repository" is used to import lots of different things, like gtk, etc...

What library is it?

Is it related to GitHub? Does it import from GitHub?

2 Answers 2

26

gi.repository is the Python module for PyGObject (which stands for Python GObject introspection) which holds Python bindings and support for the GTK+ 3 toolkit and for the GNOME apps.

See Projects/PyGObject on the GNOME Wiki.

It has nothing to do with GitHub.

7

It has nothing to do with github.

It is the Python API for GObject Introspection (gi). The repository portion is related to the repository of bindings available via GObject Introspection (girepository).

Importing bindings via this method is what replaces the old straight Python bindings for gobject, glib, gtk and similar libraries.

Not the answer you're looking for? Browse other questions tagged .