Import stock price history from QIF?

prl prl at
Wed Sep 21 21:34:31 EDT 2011

On 10/09/11 21:39, Derek Atkins wrote:
> Hi,
> On Fri, September 9, 2011 10:46 pm, prl wrote:
>> On 10/09/11 11:51, prl wrote:
>>> ...
>>> I'm planning on writing a Perl script to translate QIF closing prices
>>> into GnuCash "last" prices
>>> ...
> [snip]
> Also note that editing the XML from outside GnuCash is "not 
> supported". To do what you want you should really use the Scheme or 
> Python bindings to write an application to load your historical quotes 
> into GnuCash. Or you could write something in C, of course! This way 
> you can use the GnuCash API.

I've had a look at the examples of using the Gnucash Python bindings to 
add stock prices to a Gnucash XML file, and I think I can fairly readily 
modify them to allow me to import my exported QIF stock prices.

Just one minor hurdle: my Googling hasn't found any description of how 
to install the Python bindings without doing a full build from source. 
On OS X 10.6.8 and the OS X binary distribution of Gnucash 2.4.7, if 
that makes any difference.

I've seen the posts about prefixing the python command with 
to ensure that LD_LIBRARY_PATH, DYLD_LIBRARY_PATH and so on are set 

Section 17 of the GnuCash Tutorial and Concepts Guide doesn't exactly 
fill me with confidence that what I want to do is possible without 
rebuilding from source: "To be able to use Python scripts, GnuCash must 
have been compiled with this option enabled, otherwise all what follows 
won’t work. At present this option is not enabled by default, so if you 
need this, you may have to compile GnuCash from source yourself. "

Do I just need to bite the bullet and build GnuCash for myself?


More information about the gnucash-user mailing list