Python tKinter EventLoop pauses calls to after() - MAC OSX -
i'm finding if use root.after()
make function repeat, click on menu or launch dialog, stop repeating until dialog or menu closed.
this not behaviour want - function keep repeating, when menu or dialog open.
could tell me if expected behaviour, , if so, if there way stop it?
sample code:
def repeater(): print("repeating") root.after(500, repeater) root.after(500, repeater) root.showerror("error", "error")
---edit---
sorry, had no access dev environment, couldn't give full code example.
on mac osx, in python 3.6
here's full code sample:
from tkinter import tk, button, messagebox def msg(): print("repeating") root.after(500, msg) def pop(): messagebox.showinfo( "block", "blocking...") root = tk() button(root, text="pop", command=pop).pack() root.after(500, msg) root.mainloop()
whenever click button, or click of osx menus - stops printing message...
--- edit 2 --- i've been able access raspberry pi - , test code on there. works fine, popup not stop message being printed out. it's therefore starting mac osx issue - el capitan, 10.11.6
from comments on original post - seems code works fine on windows.
can else test on osx, confirm it's problem?
Comments
Post a Comment