Terry J. Reedy added the comment:

This is purely a tkinter issue.  Windows people can ignore this.

Your problem was a result of your program error, of not keeping a reference to 
Tk(), combined with tkinter's _default_root 'feature'.

The solution you report in your answer, 'root = tkinter.Tk()', later followed 
by an explicit 'root.destroy()' is *the* correct way to do what you want.  I 
explained further in my answer.

There is no way for askopenfilename to know that you are done with root or 
tkinter._default_root.

----------
assignee: terry.reedy -> 
components:  -IDLE, Windows
nosy: +serhiy.storchaka
resolution:  -> not a bug
stage:  -> resolved
status: open -> closed
versions: +Python 3.7 -Python 3.5

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue31309>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to