Python and Tktable

Martin Franklin mfranklin1 at gatwick.westerngeco.slb.com
Thu Nov 7 04:59:50 EST 2002


On Wed, 2002-11-06 at 17:58, Timofey Sleptsov wrote:
> Hello All!
> 
> I am try to use Tktable library with python, but without any result ;(
> For example, i type it:
> 
> Python 2.2 (#1, Mar 29 2002, 17:58:00) 
> [GCC 2.95.3 20010315 (release)] on linux2
> Type "help", "copyright", "credits" or "license" for more information.
> >>> import Tkinter
> >>> root = Tkinter.Tk()
> >>> root.tk.eval('package require Tktable')
> Traceback (most recent call last):
>   File "<stdin>", line 1, in ?
> TclError: couldn't load file "/usr/lib/Tktable2.7/Tktable.so.2.7":
> /usr/lib/Tktable2.7/Tktable.so.2.7: undefined symbol: tclStubsPtr
> >>> 
> And get error message. 
> 


class Table(Widget):
    """table widget."""
    def __init__(self, master=None, cnf={}, **kw):
        ## hack to load a dynamic.so into tk.....
        try:
            master.tk.call('package', 'require', 'Tktable')
        except TclError:
            try:
                master.tk.call('load', '', 'Tktable')
            except TclError:
                pass
        Widget.__init__(self, master, 'table', cnf, kw)


This is taken from the Tk Table/Tkinter  module (still working on it!) 
I hope to finish it later this year!


I found when google'ing a couple of TkTable.py modules perhaps you would
be happy using them...

http://tix.sourceforge.net/Tixapps/

Seems to be the most up to date....

Oh and looking at the Tktable sourceforge page it seems to be up to
version 2.8


Martin





More information about the Python-list mailing list