Bugs item #1733943, was opened at 2007-06-09 13:35 Message generated for change (Tracker Item Submitted) made by Item Submitter You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1733943&group_id=5470
Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: Tkinter Group: Python 2.6 Status: Open Resolution: None Priority: 5 Private: No Submitted By: Hirokazu Yamamoto (ocean-city) Assigned to: Martin v. Löwis (loewis) Summary: Tkinter is not working on trunk (2.6) Initial Comment: Hello. I tried to run tk app on trunk, I got following error. /////////////////////////////////// // Code import Tkinter as Tk root = Tk.Tk() label = Tk.Label(root, text="Test") label.pack(fill=Tk.BOTH, expand=True) root.mainloop() /////////////////////////////////// // Error Traceback (most recent call last): File "\debug.py", line 6, in <module> label = Tk.Label(root, text="Test") File "e:\python-dev\trunk\lib\lib-tk\Tkinter.py", line 2464, in __init__ Widget.__init__(self, master, 'label', cnf, kw) File "e:\python-dev\trunk\lib\lib-tk\Tkinter.py", line 1930, in __init__ (widgetName, self._w) + extra + self._options(cnf)) _tkinter.TclError: invalid command name "label .12893496 -text Test" This is due to the change revision 55504 (Stop using METH_OLDARGS) Currently, lib/lib-tk/Tkinter.py uses this convension 1929: self.tk.call( 1930: (widgetName, self._w) + extra + self._options(cnf)) ...passing argument as single tuple. METH_OLDARGS treats this as same as self.tk.call( widgetName, self._w, *(extra + self._options(cnf))) So it was working, but now METH_VARARGS, it doesn't expand single tuple as arguments. Maybe do we need to check all tk.call and apply patches like this? Index: Lib/lib-tk/Tkinter.py =================================================================== --- Lib/lib-tk/Tkinter.py (revision 55836) +++ Lib/lib-tk/Tkinter.py (working copy) @@ -1927,7 +1927,7 @@ classes.append((k, cnf[k])) del cnf[k] self.tk.call( - (widgetName, self._w) + extra + self._options(cnf)) + widgetName, self._w, *(extra + self._options(cnf))) for k, v in classes: k.configure(self, v) def destroy(self): # Maybe already someone working on this? ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1733943&group_id=5470 _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com