Re: [GNC-dev] Problems with python 3 and the gnucash python bindings.

2018-07-10 Thread David Osguthorpe
OK Will file a bug - plus file a fix for GSList which is still needed. David On Tue, Jul 10, 2018 at 10:28 PM, John Ralls wrote: > > > > On Jul 10, 2018, at 11:58 AM, David Osguthorpe < > david.osgutho...@gmail.com> wrote: > > > > Hi All, > > > >

[GNC-dev] Problems with python 3 and the gnucash python bindings.

2018-07-10 Thread David Osguthorpe
Hi All, In upgrading to gnucash 3.2 from 2.6.18 and updating my python scripts I have found an issue with the gnucash bindings and python 3. I saw this with query runs that failed to produce any results when they should have, and used to under 2.6.18. So far it appears the issue is with the w

Re: [GNC-dev] Removing gncmod-python.c in commit 4ecd9c2dd41ae75ec4e82a662a241543fc075c01

2018-07-05 Thread David Osguthorpe
this in its spam! Will add the patch. David On Tue, Jul 3, 2018 at 6:21 PM, John Ralls wrote: > > >> On Jul 3, 2018, at 9:11 AM, David Osguthorpe >> wrote: >> >> Hi, >> >> Would a patch to restore gncmod-python.c be accepted for inclusion. >

[GNC-dev] Removing gncmod-python.c in commit 4ecd9c2dd41ae75ec4e82a662a241543fc075c01

2018-07-03 Thread David Osguthorpe
. Note that gncmod-python.c was only place the init.py script was used. Thanks David Osguthorpe ___ gnucash-devel mailing list gnucash-devel@gnucash.org https://lists.gnucash.org/mailman/listinfo/gnucash-devel

Re: Report wrapper to call python scripts?

2014-12-24 Thread David Osguthorpe
On Wed, Dec 24, 2014 at 08:38:06AM -0800, John Ralls wrote: > > > On Dec 24, 2014, at 7:38 AM, David Osguthorpe > > wrote: > > > > (By the way note that GnuCash is multithreaded because Gtk is > > multi-threaded - in the initial > > implementation attemp

Re: Report wrapper to call python scripts?

2014-12-24 Thread David Osguthorpe
On Wed, Dec 24, 2014 at 08:07:45PM +0400, Dmitry Pavlov wrote: >Can you send link to your git repo with that changes? > Supposedly this is it https://github.com/davidjo/gnucash_python.git David ___ gnucash-devel mailing list gnucash-devel@gnucash.

Re: Report wrapper to call python scripts?

2014-12-24 Thread David Osguthorpe
On Wed, Dec 24, 2014 at 12:25:23PM +0100, Geert Janssens wrote: > If I understand you correctly you want to separate the options from the > report generating code ? > So your wrapper script would be responsible for displaying the options to the > user and the > actual report script only gets th

Re: Working example of kvp acess in Python

2014-06-10 Thread David Osguthorpe
On Mon, Jun 09, 2014 at 12:53:38AM +0200, Christoph Holtermann wrote: > Hello, > > for my python latex invoice script I tried to access the owners data. I tried > to work my way to it and came across the kvp system. I made a rude > path through there with a working example to access the companies

Re: Python Bindings

2014-05-31 Thread David Osguthorpe
On Sat, May 31, 2014 at 12:27:25PM -0700, John Ralls wrote: > > Why not instead add python to the swig files for the API that you need? It's > only one header, gnc-budget.h, and you can use the Guile adapter code in > src/engine/engine.i as a guide. > not quite as simple as this - I added gnc-

Re: Python Bindings

2014-05-31 Thread David Osguthorpe
On Sat, May 31, 2014 at 11:42:14AM -0700, Marc Shapiro wrote: > Keeping this on the list... > > That's documentation, of a sort. Not great, but it does pretty much > verify that there is nothing in there for handling budget, or future > transactions. Since I would need that in order to do a pr

Re: Python Module and libdbi-0.9.0

2014-05-27 Thread David Osguthorpe
> > But it brings up another question: What good is the Python module? This isn’t > the python bindings that allow one to use the GnuCash API from a Python > program, this is something that tries to use those bindings from inside of > GnuCash. The former live in src/optional/python-bindings. Th

Re: Python bindings: patch, documentation, examples

2014-05-09 Thread David Osguthorpe
On Thu, May 08, 2014 at 11:47:34PM -0700, mshapiro wrote: > David Osguthorpe wrote > > I have a very hacky implementation in gnucash to call python from guile > > and > > return results to guile - I found existing libraries to do both > > (no updates to gnucash required

Re: Git branch cleanup

2014-04-11 Thread David Osguthorpe
On Fri, Apr 11, 2014 at 04:11:26PM -0700, John Ralls wrote: > > On Apr 11, 2014, at 4:02 PM, David Osguthorpe > wrote: > > > On Fri, Apr 11, 2014 at 03:10:22PM -0700, John Ralls wrote: > >> I’d like to delete most of the old feature branches from the repository, &g

Re: Git branch cleanup

2014-04-11 Thread David Osguthorpe
On Fri, Apr 11, 2014 at 03:10:22PM -0700, John Ralls wrote: > I’d like to delete most of the old feature branches from the repository, but > I don’t want to lose the history, so I’ve created a new branch called > “archive” and merged in the feature branches in the right order. > > Having the “h

Re: Python bindings: Account.getName() raises TypeError

2014-03-16 Thread David Osguthorpe
On Sun, Mar 16, 2014 at 11:04:59PM +0100, Felix Schwarz wrote: > > > > but then theres another error > > Actually your change resolves the problem for me :-) OK - yes - I think my error came because the existing book I used did not have any of the default accounts defined > > On a second run I

Re: Python bindings: Account.getName() raises TypeError

2014-03-16 Thread David Osguthorpe
this is one solution - which relates to the change between 2.4/2.6 and get_children() for child in original_parent_account.get_children(): #original_account = Account(instance=child) original_account = child but then theres another error (note the new way is the way it shoul

Re: Python bindings: Account.getName() raises TypeError

2014-03-16 Thread David Osguthorpe
On Sun, Mar 16, 2014 at 08:54:10PM +0100, Felix Schwarz wrote: > > Am 16.03.2014 20:38, schrieb John Ralls: > > The signature of xaccAccountGetName is const char* xaccAccountGetName > > (const Account *); the const was added in 2005. A "const Account *" is not > > the same as an "Account const *

Re: Python bindings: Account.getName() raises TypeError

2014-03-16 Thread David Osguthorpe
On Sun, Mar 16, 2014 at 08:08:44PM +0100, Felix Schwarz wrote: > Hey, > > after switching to gnucash 2.6 I noticed that at least some of the Python > methods are broken [1]. A call to Account.getName() raises a TypeError but > unfortunately the error message is not helpful to me (as I never used s

Re: Getting tax percentage using python bindings 2.6.0

2014-01-26 Thread David Osguthorpe
> > I expected a TaxTable to consist of multiple TaxTableEntries, but this is > what I get when I retrieve the entries using tt.GetEntries(): > [ '_gnc_monetary *' at 0xb491a3c8> >] > Unfortunately this is very likely the same issue I mentioned a week or so ago - in base-typemaps.i the out typem

base-typemaps.i and budgets

2014-01-16 Thread David Osguthorpe
In attempting to use qof query to look up budgets I have come across an issue in base-typemaps.i for which Im not sure would be the approved way to fix. The first python Query class usage to attempt to return budgets returned a list of gnc_monetary types, yet it should have been GncBudget. (not

Re: Python bindings: patch, documentation, examples

2014-01-14 Thread David Osguthorpe
> > > > what is the Query interface - is that the libqof functions?? > > > > Is there an example which shows how this is done - I dont remember seeing > > any query functions > > for budgets in gnc-budget.c > > The current interface is QOFQuery. All of the persistent objects in Engine > imple

Re: Python bindings: patch, documentation, examples

2014-01-14 Thread David Osguthorpe
On Mon, Jan 13, 2014 at 03:59:29PM -0800, John Ralls wrote: > > Please remember to copy the list on all replies. Use “reply all” or, if your > mailer supports it, “reply list”. sorry - on some lists the list email is first - others not - remembering which one is which is a problem > > You sho

Re: Python bindings: patch, documentation, examples

2014-01-13 Thread David Osguthorpe
On Sun, Jan 12, 2014 at 08:14:11PM -0800, John Ralls wrote: > > > * Who is maintaining the Python bindings and is there any roadmap to > > improve them? > > They're maintained enough to keep them compiling by the core team. They're not > really part of our development plan, they're mostly just th

Re: Python bindings: patch, documentation, examples

2014-01-13 Thread David Osguthorpe
I am using the python bindings - in fact was just going to see about getting some patches to update the bindings. Just updated to 2.6.0 - looks as though some functions that used to exist no longer exist in the Account class so need to be removed from gnucash_business.py Ive noticed that the pyth