Python API questions
Niranjan Rao
nhrdls at gmail.com
Tue Oct 22 16:58:13 EDT 2013
Greetings,
Got couple of questions about python API. First important question is if
the python API is officially supported API?
I am on Ubuntu 12.04, using version 2.4.10 through standard sources.
Python bindings are also installed from standard Ubuntu repositories.
Have a simple python script adapted from python examples, as follows.
What confuses me is if I uncomment line "#exp.save()", then exported
data is overwritten. Does this mean I don't need to call save on
exported file? If I leave the commented block, account export does work
properly.
from gnucash import Session, Account, Transaction, Split, GncNumeric
session = Session("/tmp/gnucash.xml.gz", is_new=False)
exp = Session("xml:///tmp/t3.xml" , is_new=True)
exp.export(session, None)
#exp.save()
exp.end()
session.end()
Regards.
Niranjan
More information about the gnucash-devel
mailing list