I have some really Tcl code which I would like to run in Python: package require Tk package require Tablelist proc main {} { tablelist::tablelist .t -columns {0 Test} -stretch 1 .t insert end {{} {}} .t cellconfigure end,0 -window {createWindow} .t insert end {{} {}} .t cellconfigure end,0 -window {createWindow} pack .t -side top -fill both -expand true } proc createWindow {t row col path} { set width [.t columnwidth 0 -total] button $path -width $width } main
This is what I have in Python: from Tkinter import * import tktablelist def createWindow(t,row,col,path): b = Button(path) def main(): t = tktablelist.TableList(root,columns = (0,' ')) t.insert(END, (None, None)) t.cellconfigure("end,0",window=createWindow) t.pack() root = Tk() main() root.mainloop() I get an error because I don't know how to format the "window" for createWindow. What should I do to embed the button in the Tablelist? I am using the Tablelist wrapper from this website: http://tkinter.unpythonic.net/wiki/TableListWrapper
-- http://mail.python.org/mailman/listinfo/python-list