documentation for python bindings

Rolf Leggewie no2spam at nospam.arcornews.de
Tue Jul 22 20:22:43 EDT 2008


[resend to list where it did not arrive for some reason or another]

Hi Mark,

thank you for your reply.  I tried things out and had some successes but
mostly failed.

Mark Jenkins wrote:
>> Looking through the
>> source code and the provided examples, it looks like the API can be used
>> both for reading and writing.  

Is this correct?  Manipulation of the gnucash file from the python
bindings is possible (rw)?

> Documentation is pretty bad right now. Help needed.

Somebody like me that does not understand the slightest thing about it
is probably not much help but I started
http://wiki.gnucash.org/wiki/Python_Bindings where I will write about
what I have it learned from this thread and while fiddling around.

What I am trying to do is open a gnucash file, find the account
identified by code 1234 and mark it as tax relevant.  Would you be so
kind to help me with that?

The steps outlined in
http://wiki.gnucash.org/wiki/Python_Bindings#setting_things_up produce
an error initially, importing __init__ a second time runs fine.  Is that
a bug?  I am still very inexperienced with this.  All I can say is that
setting the PYTHONPATH and then running your example scripts with
"python $script" on hardy produces a very similarly looking error about
"could not locate gnucash/engine interface v.0".  When using ipython to
go through the steps lined out in simple_book.py I get a bunch of

(process:11900): GLib-CRITICAL **: g_hash_table_lookup: assertion
`hash_table != NULL' failed

That sort of looks like something did not go so well, either.  But I am
just poking around really and doing everything wrong, probably.

Regards

Rolf



More information about the gnucash-devel mailing list