Replacing excel: but with what ?
Jeff Hobbs
JeffH at ActiveState.com
Mon Mar 25 18:20:20 EST 2002
Cliff Wells wrote:
>
> On Sat, 23 Mar 2002 23:46:14 +0200
> Joonas Paalasmaa wrote:
>
> > Does Tkinter meet your needs? You can create a spreadsheet by griddinng
> > Entry widgets. There is an example in Lutz's Programming Python 2'nd
> > Edition, if you happen to owe it.
>
> Doing this was exactly what moved me to wxPython a couple of years ago.
> This approach will work, but it will be extremely slow for even a
> moderately large spreadsheet. I even tried writing a spreadsheet widget
> from scratch using Tkinter and although it was much faster, it was still
> too slow (unfortunately I no longer have the code or I'd send it to you
> =P). Something like this needs be written in a compiled language.
Missed the original post on this (shi!!y news server), but if you are
looking for a robust spreadsheet-like widget for Tkinter, you should
look at tktable:
http://tktable.sourceforge.net/
It provides all sorts of fancy features, and definitely handles 100,000+
elements without sweating (I've run tests with 500,000 elements - it's
coded as a C widget extension to Tk). It's not a "spreadsheet" per se,
but it does provide the basis for one.
It is written just as a Tcl/Tk extension though. I got mail once from
someone that had used it with Tkinter, but I can't find that now. From
what I understand of Tkinter, it should be pretty easy to use as it just
loads dynamically into Tk. IOW, I don't know what the "out-of-box"
experience would be for a Tkinter user, but it is the table widget of
choice for Tk.
Tix is a set of widgets for Tk that does have a proper Tkinter port,
and also provides a "tixGrid" widget. It doesn't have the features of
tktable, but if you are doing mostly read-only stuff, it may suffice.
--
Jeff Hobbs The Tcl Guy
Senior Developer http://www.ActiveState.com/
More information about the Python-list
mailing list