klappnase added the comment: Ok, I investigated this a little further. First I noticed another bug with the code from my first post, the "self._w" must be omitted from the call to busy_current(), so the func should look like:
def busy_current(self, pattern=None): return([self._nametowidget(x) for x in self.tk.splitlist(self.tk.call( 'tk', 'busy', 'current', pattern))]) I did then some more testing, the code now seems to work flawlessly both with Python-3.5.2 on windows 10 and with Python 2.7 on debian Jessie. So I finally prepared a patch (against the __init__.py file from the 3.5.2 windows installer). Following Miguel's suggestion I also added aliases prefixed with tk_ to the various busy_... methods. Since I am not familiar with Python's "official" test mechanisms, for now I wrote a simple script that does a number of calls to the tk_busy_... functions to test if everything works as expected: try: import Tkinter except: import tkinter as Tkinter #Tkinter.wantobjects = False root = Tkinter.Tk() f = Tkinter.Frame(root, name='f') f.pack(fill='both', expand=1) b=Tkinter.Button(f, name='b', text='hi', command=root.bell) b.pack(padx=100, pady=100) top = Tkinter.Toplevel(root, name='top') def test1(): root.tk_busy() def test2(): root.tk_busy_forget() def test3(): root.tk_busy_hold(cursor='gumby') def test4(): root.tk_busy_forget() def test5(): root.tk_busy_hold() top.tk_busy(cursor='gumby') print(root.tk_busy_current()) print(root.tk_busy_current(pattern='*t*')) def test6(): print(root.tk_busy_current()) def test7(): root.tk_busy_configure(cursor='gumby') def test8(): print(root.tk_busy_configure()) print(root.tk_busy_configure('cursor')) print(root.tk_busy_cget('cursor')) def test9(): print(root.tk_busy_status()) def test10(): root.tk_busy_forget() print(root.tk_busy_status()) print(root.tk_busy_current()) delay = 0 for test in (test1, test2, test3, test4, test5, test6, test7, test8, test9, test10): delay += 1000 root.after(delay, test) root.mainloop() ---------- keywords: +patch Added file: http://bugs.python.org/file45190/tk_busy.diff _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue28498> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com