report in python, a first version

Sébastien de Menten sdementen at gmail.com
Mon Nov 14 22:05:18 EST 2016


On Nov 15, 2016 1:27 AM, "John Ralls" <jralls at ceridwen.us> wrote:
>
>
> > On Nov 14, 2016, at 1:31 PM, Sébastien de Menten <sdementen at gmail.com>
wrote:
> >
> > Hello,
> >
> > I have finished a first version of a mechanism to use python for
reporting
> > in gnucash.
> > It uses a scheme script to start a python process that does the heavy
> > lifthing.
> >
> > Should you be interested, you can find documentation/instructions here:
> >
http://gnucash-utilities.readthedocs.io/en/master/doc/doc.html#report-creation-linux-and-windows-python-3-5
> > as well as an example of the simplest report possible
> >
http://gnucash-utilities.readthedocs.io/en/master/doc/doc.html#a-simple-report
> >
> > Any feedback appreciated.
>
> Sébastien,
>
> Did you decide to not use the facility in src/optional/python to start a
Python interpreter inside of GnuCash because you didn't know about it,
because it was easier to do something in Scheme, or because that
interpreter can't interact with the existing (Scheme) report facilities?
>
> Regards,
> John Ralls
>

I didn't (and still don't) know a lot about this embedded python
interpreter. Any link pointing to doc by any chance ?
I wanted something that could leverage the "report options" framework (this
is purely in scheme, correct ?), could be hot plugable on gnucash (no
recompilation) and rather generic (the subprocess can be any specific
python intepreter, usually one in a virtualenv,  but this could be adapted
to launch any subprocess ... perl ? node.js ?).
I therefore hacked a way via scheme reusing logic found in the quote
updater to spawn external processes.
If anything can be simplified/better designed, I am in.

Sebastien


More information about the gnucash-devel mailing list