python: import gnucash

Ian Smith-Heisters i at idiosyncra.tc
Sun Mar 1 17:46:27 EST 2009


Hi folks,

I just compiled gnucash-svn so that I can play with DBI and Python
bindings. I had to pull it from the unofficial clone on github, since
svn.gnucash.org seems to be down?

Everything compiled fine, was able to load my data into the db. Now I
try to use python, but I'm not sure what to set my PYTHONPATH to. I've
looked around my system, but I can't find anything that looks like a
Python gnucash Module except for gnucash_core.py in the source tree. I
tried using that:

--
$ cd /usr/src/gnucash.git/src/optional/python-bindings/
$ ipython
Python 2.5.2 (r252:60911, Oct  5 2008, 19:29:17)
Type "copyright", "credits" or "license" for more information.

IPython 0.8.4 -- An enhanced Interactive Python.
?         -> Introduction and overview of IPython's features.
%quickref -> Quick reference.
help      -> Python's own help system.
object?   -> Details about 'object'. ?object also works, ?? prints more.

In [1]: import gnucash_core
---------------------------------------------------------------------------
ImportError                               Traceback (most recent call last)

/usr/src/gnucash.git/src/optional/python-bindings/<ipython console> in
<module>()

/usr/src/gnucash.git/src/optional/python-bindings/gnucash_core.py in <module>()
     22 # @author Jeff Green,   ParIT Worker Co-operative <jeff at parit.ca>
     23
---> 24 import gnucash_core_c
     25
     26 from function_class import \

ImportError: No module named gnucash_core_c

In [2]:
--

... which is kinda what I expected. Can anyone provide a pointer?

Thanks,
Ian


More information about the gnucash-devel mailing list