sqlite3 assumed in python example script account_analysis.py ?
Geert Janssens
janssens-geert at telenet.be
Thu Jan 27 12:10:41 EST 2011
As I'm interested in using the python bindings for an internal project here, I
started playing with the example scripts.
The first one I played with, is account_analysis.py.
There is a comment in the script that says it only supports sqlite3 files. The
way the session is opened does indeed limit the choice of input files to
sqlite3.
I'm just wondering, why was this done ? Simply changing the line that opens
the session from
gnucash_session = Session("sqlite3://%s" % gnucash_file, is_new=False)
to
gnucash_session = Session(gnucash_file, is_new=False)
would allow the script to open any kind of database backend.
If you pass it an ordinary filename without a type prefix, the gnucash code
will determine the internal format automatically.
Was there a reason to specifically limit this example to sqlite3 ?
Geert
More information about the gnucash-devel
mailing list