python: import gnucash
Mark Jenkins
mark at parit.ca
Fri Sep 4 12:22:17 EDT 2009
> 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.
The installation location is determined by automake macros, as it
depends on your platform, python, and choice of --prefix.
http://www.gnu.org/software/hello/manual/automake/Python.html
When you run ./configure, it is announced as follows:
"""
checking for python extension module directory...
${exec_prefix}/lib/python2.5/site-packages
"""
So you can see that for me that's in
${exec_prefix}/lib/python2.5/site-packages
After successful installation there will be a gnucash directory in
there. Your PYTHONPATH should be the containing directory, not the
gnucash one itself.
> 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:
Do you have --enable-python-bindings set when you configure? What does
configure say when it's doing python tests? Does python-bindings appear
at the end under "Options detected/selected" for "Optional components"?
Also of note, the python development stuff (include, and lib) required
for compiling are identified with the macros/ac_python_devel.ac.
http://www.nongnu.org/autoconf-archive/ac_python_devel.html
This macro file is now obsolete and superseded by
http://www.nongnu.org/autoconf-archive/ax_python_devel.html
An upgrade may enable more people to be able to build this.
More information about the gnucash-devel
mailing list