This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Title: warn user of creation of multiple Tk instances
Type: behavior Stage: resolved
Components: Tkinter Versions:
Status: closed Resolution: not a bug
Dependencies: Superseder:
Assigned To: Nosy List: mps, serhiy.storchaka
Priority: normal Keywords:

Created on 2018-02-12 10:14 by mps, last changed 2022-04-11 14:58 by admin. This issue is now closed.

Messages (2)
msg312036 - (view) Author: (mps) Date: 2018-02-12 10:14
tkinter is the first GUI interface used by novices. 
They often get in trouble when they create a new Tk instance instead of a Toplevel.
It would be helpful to output a warning message in this case (i.e. checking _default_root is not None and _support_default_root is True in the Tk initialization).
Thank for your attention and best regards.

- mps.
msg313860 - (view) Author: Serhiy Storchaka (serhiy.storchaka) * (Python committer) Date: 2018-03-15 08:45
A warning will harm users that create multiple Tk instances intentionally. If it would be always bad, it should raise an error instead of a warning.
Date User Action Args
2022-04-11 14:58:57adminsetgithub: 77006
2020-12-28 10:45:36serhiy.storchakasetstatus: open -> closed
resolution: not a bug
stage: resolved
2018-03-15 08:45:48serhiy.storchakasetmessages: + msg313860
2018-02-16 20:47:09terry.reedysetnosy: + serhiy.storchaka
2018-02-12 10:14:02mpscreate