My first "bug" report here. Not sure I am doing it right. It is just that if I execute the code
import tkinter
from tkinter import simpledialog
tkinter.Tk().withdraw()
integer_value = simpledialog.askinteger('Dialog Title', 'What is your age?', minvalue=0, maxvalue=100)
It works. In particular, when the line `parent = tkinter._default_root` is executed in simpledialog.py, `_default_root` is defined. However, if I execute the code
import tkinter
from tkinter import simpledialog
integer_value = simpledialog.askinteger('Dialog Title', 'What is your age?', minvalue=0, maxvalue=100)
which does not have the line `tkinter.Tk().withdraw()` it does not work. When the line `parent = tkinter._default_root` is executed, `_default_root` is not defined.
I don't know if it is a bug. I don't understand the remainder of the code enough to say. However, the purpose of this line is to define a parent when none is provided. It seem to me that it should be possible to find a parent window... |