What's the easiest Python datagrid GUI (preferably with easy database hooks as well)?
Ian Kelly
ian.g.kelly at gmail.com
Wed Mar 13 16:01:09 EDT 2013
On Wed, Mar 13, 2013 at 12:40 PM, <tinnews at isbd.co.uk> wrote:
> I want to write a fairly trivial database driven application, it will
> basically present a few columns from a database, allow the user to add
> and/or edit rows, recalculate the values in one column and write the
> data back to the database.
>
> I want to show the data and allow editing of the data in a datagrid as
> being able to see adjacent/previous data will help a huge amount when
> entering data.
>
> So what toolkits are there out there for doing this sort of thing? A
> GUI toolkit would be lovely (allowing layout etc.) but isn't
> absolutely necessary.
>
> I'm a reasonably experienced programmer and know python quite well
> but I'm fairly much a beginner with event driven GUI stuff so I need
> a user friendly framework.
I've done something similar using wxPython and sqlalchemy. I use a
wxGrid with a wxGridTableBase subclass that keeps a sqlalchemy ORM
Session to access the database. The whole application is around 1300
lines of code but is probably more complex than what you need -- it
currently has five different views built in and supports some fancier
things like dropdown editing of foreign keys and many-to-many
relations; cells with type-ahead; filtering and sorting.
I don't know if that's the easiest way to do it, but I can at least
report that it can be done.
More information about the Python-list
mailing list