Python API, book options

John Ralls jralls at ceridwen.us
Fri Jun 20 18:10:16 EDT 2014


On Jun 20, 2014, at 2:23 PM, Christoph Holtermann <c.holtermann at gmx.de> wrote:

> Hello,
> 
> I had just the same question for a while. I have been successful to access
> that data. I had to make some modifications which I put in a branch on
> github: https://github.com/c-holtermann/gnucash/tree/python-kvp
> See thread "Working example of kvp acess in Python".
> 
> But the best way to access that data has yet to be found before I ask it
> to be pulled into master.

KVP is private to the engine and off limits for python bindings. We’re certainly not going to revert the private-kvp changes, which is what your fork partly does.

In master, all of the stuff stored in KVP is accessible via GObject properties. QofInstance seems not to be exported, but you can import GObject via gobject-introspection and use GObject.GObject.get/set_property(); if you write just be sure to do it in an edit/commit block and to mark the instance dirty.

Regards,
John Ralls




More information about the gnucash-devel mailing list