I'm following http://www.micahcarrick.com/gsettings-python-gnome-3.html to use GSettings from python, and I've succeeded to read a value:
from gi.repository import Gio
gso=Gio.Settings.new("org.gnome.desktop.wm.preferences")
gso.get_value("focus-mode")
This returns a "GLib.Variant", one of a set of enum values. To get valid enums I can set, I use:
gso.get_range("focus-mode")
However, the docs say
g_settings_get_range has been deprecated since version 2.40 and should not be used in newly-written code. Use g_settings_schema_key_get_range() instead.
So, how do I use g_settings_schema_key_get_range from python?
More generally, how can I introspect Gio to work out how to use it from python given the C docs?
You can also use the online documentation for PyGobject:
That documentation is a gem. By the way, I believe you would also be interested in
gso.get_enum(key)
: