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.

Author dominic108
Recipients dominic108
Date 2019-12-31.08:15:46
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1577780147.06.0.429247944585.issue39171@roundup.psfhosted.org>
In-reply-to
Content
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...
History
Date User Action Args
2019-12-31 08:15:47dominic108setrecipients: + dominic108
2019-12-31 08:15:47dominic108setmessageid: <1577780147.06.0.429247944585.issue39171@roundup.psfhosted.org>
2019-12-31 08:15:47dominic108linkissue39171 messages
2019-12-31 08:15:46dominic108create