On Mon, 2011-04-11 at 08:32 -0500, Bruno Wolff III wrote:
On Mon, Apr 11, 2011 at 09:27:48 -0400,
Matthias Clasen <mclasen(a)redhat.com> wrote:
> On Sun, 2011-04-10 at 08:48 -0500, Bruno Wolff III wrote:
> > It would be nice to use gsettings to add or remove an item from the
> > favorite-apps key without having to read the old list, parse it with
> > something, pass a modified list back to gsettings to replace the old
> > value.
> >
> > Is there any plan for gsettings to get a feature to do this in one step?
>
> No immediate plan, no. I wouldn't necessarily reject a patch, but it is
> a little hard to know where to stop, once you start down that route...
> GSettings lets you store arbitrary variants.
I was afraid that the list structure was opaque to gsettings. That does
make it harder to start down that path, but isn't really a surprise.
The list format looks python friendly. I was a bit worried about writing
a script to use to process the changes in python for kickstart files,
but given that livecd-creator and anaconda both need python, it seems
pretty safe to assume python will be available where I need it.
Thanks for the response.
I don't really think you want to go down the route of wrapping a python
script around the gsettings cmdline tool. You should just use
introspection, and use gsettings directly from python, or whatever
language you prefer.