Python Shell

Christoph Holtermann c.holtermann at gmx.de
Mon Jan 10 17:04:50 EST 2011


Hello and a happy new year !

My interest in gnucash is to have a python-shell-environment which lets me easily access and display
data. I have written some things for myself like simple functions
PrintTransaction(Transaction) and so for other objects.

I use IPython for that purpose. I would like to submit my tries in that direction but for myself I would
like to find the best solution for at least these printing functions before I do to not submit something
too preliminary.

I wonder in which way a function that prints an complex object should be done.

When looking around in the internet i saw things like object.prettyPrint(). I came across
object.__format__().

When I print out for example a transaction i want to print out information of objects that are nested into
it. For example I would probably also to print out the splits.

I would like to have some function of the objects that are always called the same way. In the end I would
like to have something as easy as

print object.

Could someone point me something helpful ?

regards,

Christoph Holtermann


More information about the gnucash-devel mailing list