dbus/python/examples/gconf-proxy-client.py
Seth Nickell 2e8a06bb8f 2004-05-29 Seth Nickell <seth@gnome.org>
* python/dbus.py:

	Add ObjectTree class which allows implementation
	of trees of "virtual" objects. Basically the python
	wrapper for "register_fallback".

	* python/examples/Makefile.am
	* python/examples/gconf-proxy-client.py:
	* python/examples/gconf-proxy-service.py:

	Implement a simple GConf proxy service that supports
	get/set on string and int GConf keys using the ObjectTree.
2004-05-30 02:26:48 +00:00

11 lines
333 B
Python

import dbus
gconf_key = "/desktop/gnome/file_views/icon_theme"
bus = dbus.SessionBus()
gconf_service = bus.get_service("org.gnome.GConf")
gconf_key_object = gconf_service.get_object("/org/gnome/GConf" + gconf_key, "org.gnome.GConf")
value = gconf_key_object.getString()
print ("Value of GConf key %s is %s" % (gconf_key, value))