Is there a standard way of accessing Gnome configuration information (i.e. ~/.gconf) using Python?
Updated: please provide a short example.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Python GConf, also check out packages like python-gconf and/or gnome-python-gconf in your distros package repo:
Or browse the svn at http://svn.gnome.org/viewvc/gnome-python/trunk/examples/gconf/ for the examples.
On Fedora12 (my distro) it is called gnome-python2-gconf-2.28.0-1.fc12.x86_64.rpm, but it may be in a generic gnome-python2 package.
An example of GConf key editing (background wallpaper) in Python:
Found http://therning.org/magnus/archives/57 , and I trimmed out the GTK stuff. Of course, this would make some good getitem and setitem usage to map for example:
Also some good information here about using the API. Of course, my example is poor, but illustrates the simplicity of the API. Here are more methods:
And each
get_*has an equivalent setterset_*in most cases.