Python Shell

Christoph Holtermann c.holtermann at gmx.de
Tue Jan 18 17:39:44 EST 2011


Hello Tony!

Am 18.01.2011 23:04, schrieb Anthony Dardis:
> I'm a little confused here. If you are writing something that lets you, the user, type stuff in to cause the machine to tell you things about your GnuCash data, then there's really not a question about how to program the displaying: that's a decision to make about the thing you are writing. Unless you are using a Python interpreter (IDLE, iPython) as your user interface: if you are, then the question is about coding ...
That's the point.
>
> If the question is, which is best for coding, that depends on how you want to code it. If you like Python classes and object-oriented programming, then design and write classes that have display methods, and then the instances can display themselves. If you are less comfortable with OOP and classes, or for some other reason the design of this project says don't use classes, then write a function to display the object and pass the object to it. Neither is better or more practicable than the other.
Nice to see that searching for the best solution opens a space for creation ;-)
I just did a first approach in one of the directions by writing a __str__ function for GncNumeric. The Patch can be found at [1].
I wonder what's possible in the future ;-)
>
> Hope that helps, Tony
Thanks, yes,

bye,

Christoph

[1] https://bugzilla.gnome.org/show_bug.cgi?id=639906


More information about the gnucash-devel mailing list