[GNC-dev] Python-Bindings: issue when C expects GList argument
Matteo Lasagni <[email protected]>
| Newsgroups | gmane.comp.gnome.apps.gnucash.devel |
|---|---|
| Message-ID | <CABa9PpQfHYskAaRAggAN6EmeqwhoCsZA6CLhZJJ86YU-MFweCg@mail.gmail.com> |
Hi, I am writing a python script to automatically associate a set of invoices to a single transaction. To this end, I am trying to use the function AutoApplyPaymentsWithLots with no success: lots = [lot1, lot2, lotn, ..] owner.AutoApplyPaymentsWithLots(lots) This causes the following error: TypeError: in method 'gncOwnerAutoApplyPaymentsWithLots', argument 2 of type 'GList *' I have tried different solutions from passing different types of python objects, to updating the swig typemap and also to modifying the auto-generated gnucash_core.c...nothing worked out so far. I could write an additional c-wrapper, but I am sure there is a more general solution. Thanks, Matteo -- ------------- Matteo Lasagni *"You can't connect the dots looking forward,you can only connect them looking backwards"* [Steve Jobs]