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 terry.reedy
Recipients paul.moore, psiehr, serhiy.storchaka, steve.dower, terry.reedy, tim.golden, zach.ware
Date 2017-08-30.16:52:57
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1504111977.75.0.247855049184.issue31309@psf.upfronthosting.co.za>
In-reply-to
Content
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.
History
Date User Action Args
2017-08-30 16:52:57terry.reedysetrecipients: + terry.reedy, paul.moore, tim.golden, zach.ware, serhiy.storchaka, steve.dower, psiehr
2017-08-30 16:52:57terry.reedysetmessageid: <1504111977.75.0.247855049184.issue31309@psf.upfronthosting.co.za>
2017-08-30 16:52:57terry.reedylinkissue31309 messages
2017-08-30 16:52:57terry.reedycreate