I had the impression that tkinter is single threaded, but it seems that the 
breakpoint() or input()
does not block the mainloop to continue
If one clicks the second button that waits for an input or enter in the 
breakpoint()
the mainloop is still responsive while it waits for an input. So one can click 
any button
the first to display the message or the second that will abort with a message 
that readline cannot
be re-entered?

Why is that? What other commands can trigger such a behavior?

import tkinter as tk

def boinc():
for i in range(10):
print("boinc...")

def debug():
#breakpoint()
print("Breakpoint")
print("Input: ",end="")
s = input()
print("Entered:", s)

#-------------------------------------------------------------------------------
if __name__ == "__main__":
root = tk.Tk()
b = tk.Button(root, text="Boinc", command=boinc)
b.pack()
b = tk.Button(root, text="Debug", command=debug)
b.pack()
root.mainloop()
_______________________________________________
Tkinter-discuss mailing list
Tkinter-discuss@python.org
https://mail.python.org/mailman/listinfo/tkinter-discuss

Reply via email to