Initializing commodities table
Tripp Lilley
tlilley@perspex.com
Sun, 29 Jul 2001 20:03:36 +0000 (UTC)
I'm using src/optional/swig/examples/scan-acct.pl as a starting point to
try to understand raw access to the engine. My eventual goal, as I
mentioned in a previous message, is to make the GnuCash engine available
to Python folk.
So far, I have a really simple C test program that inits the engine,
begins and loads a book, then ends the book and exits. When loading the
book, I get this message:
** WARNING **: unable to find global commodity for ISO4217::USD adding new
which I assume means that the engine is sort of "empty" at this point, and
doesn't have many of the default definitions / entities loaded that
gnucash has when running. So how would I do "environment" initialization
similar to what the gnucash GUI is doing?
I've found src/scm/commodity-*, which would -seem- to contain, among other
things, code to "prime" the commodities table. How do I convince the
engine to run this? Or do I need to do some other black magic first, like
spinning up the guile interpreter and feeding it this code?
Thanks!
--
Tripp Lilley * http://stargate.eheart.sg505.net/~tlilley/
--------------------------------------------------------------------------
"The human soul is the greatest anti-piracy measure in the known
world, but no major company will use it."
<http://slashdot.org/comments.pl?sid=01/07/19/007240&cid=94>