Work on Python reporting and Scripting engine for GNU cash

Rahul Gaur rahul.nbg at gmail.com
Wed Mar 16 15:27:04 EDT 2011


Dear Christian,
 I've been successfully able to run configure with enabling python bindings,
but however there have been some glitches when I tried running those scripts
as per the instructions given in the comments but the following error shows
up :

>
> aregee at aregee-laptop:~/unstable/cashgnu/lib/python2.6/site-packages$
gnucash-env python account_analysis.py
Traceback (most recent call last):
  File "account_analysis.py", line 259, in <module>
    if __name__ == "__main__": main()
  File "account_analysis.py", line 153, in main
    debits_show, credits_show) = argv[1:8]
ValueError: need more than 0 values to unpack

>  aregee at aregee-laptop:~/unstable/cashgnu/lib/python2.6/site-packages$
>> gnucash-env python simple_invoice_insert.py
>
> Traceback (most recent call last):
>
>   File "simple_invoice_insert.py", line 88, in <module>
>
>     s = Session(argv[1], is_new=False)
>
> IndexError: list index out of range
>
> aregee at aregee-laptop:~/unstable/cashgnu/lib/python2.6/site-packages$
>
>
Is this just because of lack of any actual account database on my system ??
or I am doing something wrong ??

Now regarding pygtk ,well yes I 've been thinking to give it a try but as
of  I am spending some more time learning core python as I wan't
to strengthen my foundation in the language,but I hope that I'll  learn to
use pygtk libraries by gsoc.
BTW its good to hear that python module will be added to core gnucash
soon..:)
 I've been preparing a rough proposal for GSoC , and I would like to get
some inputs from the community so I 'm thinking of sending the proposal on
the mailing list..

:)
2011/3/16 Christian Stimming <stimming at tuhh.de>

> Dear Rahul,
>
> good to hear you can build from source now.
>
> Can you make sure to run configure with --enable-python, then check the
> examples in the directory src/optional/python-bindings/example_scripts
> whether
> you can run them as described in the files, respectively? This should give
> you
> a first feeling on how python programming of gnucash will look like.
>
> On another note, you can try the pygtk http://www.pygtk.org library to see
> how
> creating gtk GUI elements will look like in python.
>
> In your GSoC project, you can either try to add new GUI elements into
> gnucash
> using python and pygtk, such as a new interface to certain tasks that you
> need
> to do yourself but where you don't like the GUI right now. Or you can
> rather
> do some non-GUI coding with python, such as preparing and writing a text
> report for some numbers throughout gnucash.
>
> On the mailing list we've already received a patch that will add a python
> module into gnucash itself. The current optional/python-bindings is only a
> temporary solution in case one wants to write external python scripts, but
> again, it's a good first step for you to see what it will look like.
>
> Best Regards,
>
> Christian
>
> Am Montag, 14. März 2011 schrieb Rahul Gaur:
> > thanks for yr help..gnu cash is running properly now..compilation frm
> > svn `ve been sucessful.
> > Now for python project ideas...can you brief me about it..?
> > Thanks
> > Rahul
>
>


-- 
-------------------------------------------------------------------------------------------------------
*Regards*
*Rahul Gaur*
irc : iamaregee2
blog : aregee.wordpress.com
fb: http://facebook.com/iamaregee


More information about the gnucash-devel mailing list