On 9/8/2019 8:40 PM, jf...@ms4.hinet.net wrote:

Thank you. After a quick trace to find out the reason, I found that Tkinter 
prevents Tk() be called more than once from widget constructors, so only one Tk 
object exists:-)

There will only be one default Tk object, but there can be multiple Tk objects.

>>> import tkinter as tk
>>> r1 = tk.Tk()
>>> r2 = tk.Tk()
>>> r1.tk
<_tkinter.tkapp object at 0x000001F90F2F1D30>
>>> r2.tk
<_tkinter.tkapp object at 0x000001F90F328930>


--
Terry Jan Reedy

--
https://mail.python.org/mailman/listinfo/python-list

Reply via email to