6 from gnucash
import Session, Account, SessionOpenMode
7 from os.path
import abspath
8 from gnucash.gnucash_core_c
import ACCT_TYPE_ASSET
10 s = Session(
'sqlite3://%s' % abspath(
'test.blob'), SessionOpenMode.SESSION_NEW_STORE)
15 root = book.get_root_account()
19 a.SetType(ACCT_TYPE_ASSET)
21 commod_table = book.get_table()
22 a.SetCommodity( commod_table.lookup(
'CURRENCY',
'CAD') )