Commit graph

9 commits

Author SHA1 Message Date
Victor Stinner 259dd71c32
gh-84623: Remove unused imports in stdlib (#93773) 2022-06-13 16:28:41 +02:00
Serhiy Storchaka 675c97eb6c
bpo-42721: Improve using simple dialogs without root window (GH-23897)
When simple query dialogs (tkinter.simpledialog), message boxes
(tkinter.messagebox) or color choose dialog (tkinter.colorchooser)
are created without arguments master and parent, and the default
root window is not yet created, a new temporary hidden root window
will be created automatically. It will not be set as the default root
window and will be destroyed right after closing the dialog window.
It will help to use these simple dialog windows in programs which do
not need other GUI.

Previously, message boxes and color chooser created the blank root
window and left it after closing the dialog window, and query dialogs
just raised an exception.

Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
2020-12-25 20:19:20 +02:00
Serhiy Storchaka bb70b2afe3
bpo-15303: Support widgets with boolean value False in Tkinter (GH-23904)
Use `widget is None` instead of checking the boolean value of a widget.
2020-12-25 17:04:26 +02:00
Serhiy Storchaka 3d569fd6dc
bpo-42630: Improve error reporting in Tkinter for absent default root (GH-23781)
* Tkinter functions and constructors which need a default root window
  raise now RuntimeError with descriptive message instead of obscure
  AttributeError or NameError if it is not created yet or cannot
  be created automatically.

* Add tests for all functions which use default root window.

* Fix import in the pynche script.
2020-12-19 12:17:08 +02:00
Flavian Hautbois 76b645124b bpo-29446: tkinter 'import *' only imports what it should (GH-14864)
Add __all__ to tkinter.__init__ and submodules.  Replace 'import *'
with explicit imports in some submodules.
2019-07-25 21:30:33 -04:00
Serhiy Storchaka dc0d571b64
bpo-34964: Make Tkinter sources more readable by adding blank lines. (GH-9822) 2018-10-12 19:01:00 +03:00
Serhiy Storchaka 159e5359d9 Remove outdated TkVersion checks.
Minimal supported Tcl/Tk version is 8.4, and this is checked in _tkinter.c.
2016-04-25 13:49:11 +03:00
Georg Brandl 14fc4270da Tkinter, step 2: adapt imports. 2008-05-17 18:39:55 +00:00
Georg Brandl 3302312383 Tkinter move, part 1: move modules. 2008-05-17 18:28:57 +00:00
Renamed from Lib/lib-tk/tkCommonDialog.py (Browse further)