On Sunday June 20 2010 16:37:25 Mike Evans wrote: > On Friday June 18 2010 18:31:53 Mark Jenkins wrote: > > Hi to all again, > > > > Attached is patch, > > python_bindings_business_invoice_support_and_examples.patch that > > enhances the python bindings to include support for creating, posting, > > and paying invoices. > > > > Apply with patch -p0. > > > > The recent discussion re invoice importer inspired this. > > > > The patch is dependent on three prior patch submissions, > > nice_example_python_scripts.patch, > > python_bindings_gncnumeric_and_accounttype_constants.patch, and > > python_bindings_stability_without_guile.patch > > in that order, which I have re-attached for convenience. > > > > > > Because this is a feature enhancement, I don't expect this could be > > considered for application to trunk until 2.4 is branched away -- I know > > that feature freeze was long ago and that I'm late to the party. > > > > But, I do think this invoice creation patch illustrates the value of > > python_bindings_stability_without_guile.patch as a bug fix that should > > make it into 2.4, even with the flaw that the module linking there comes > > with a portability warning. > > see: > > http://lists.gnucash.org/pipermail/gnucash-devel/2010-June/028760.html > > http://lists.gnucash.org/pipermail/gnucash-devel/2010-June/028790.html > > http://lists.gnucash.org/pipermail/gnucash-devel/2010-June/028815.html > > I don't though if the kind of changes Christian was discussing to avoid > > those linking portability warnings would be appropriate prior to 2.4. On > > balance, I'd rather 2.4 ship with python bindings that are less portable > > than generally crash prone. > > > > I started working on this invoice creation stuff first and immediately > > started to hit major stability problems (seg faults) that I'm certain > > had nothing to do with those particular enhancements. So I wrote > > python_bindings_stability_without_guile.patch which made those problems > > go away. Then I was able to actually test and finish this invoice > > creation stuff. > > > > I could re-work things so that > > python_bindings_business_invoice_support_and_examples.patch can be > > applied first (to show stability issues with current init process), and > > python_bindings_stability_without_guile.patch applicable second to help > > illustrate that that stability patch really does make a difference > > between terrible crash and invoice create success. (and by extension, > > the stability patch should make a difference even if applied on its own > > to provide a better environment for the bindings already in trunk) > > > > I can file a bug report too. Still can't pin down exactly why the > > current python bindings init process (in trunk) is flawed, but I > > speculated before that python and guile can't play nice together. Could > > it be possible that there are symbol conflicts between the two that the > > linker doesn't tell about? > > > > As always, my branch can be followed here: > > http://svn.parit.ca/gnucash/branches/python-bindings/ > > > > > > > > Mark Jenkins > > ParIT Worker Co-op > > > > cc Mike Evans > > cc Christian Stimming > > cc Christoph Holtermann > > cc fellow ParIT members > > I've tried these patches and they seem to work fine. A few chunks failed > so some manual editing was required. Not done any extensive testing as > yet though, but business data now load and save. > > Great stuff Mark. Ah, actually, small bug. I was testing using the mysql backend. session = Session("xml://path/to/file") doesn't work:
GnuCashBackendException: call to begin resulted in the following errors, (1003,) I'm sure this worked before. -- GPG Key: 1024D/050895C2 Keyserver: http://pgp.mit.edu/ Search String: 0x050895C2 _______________________________________________ gnucash-devel mailing list gnucash-devel@gnucash.org https://lists.gnucash.org/mailman/listinfo/gnucash-devel