Python 3.3 tkinter.filedialog.askopenfile () leaves unresponsive Tk window

I am trying to get the user to select a file via the browser popup directory. Looks at things suggested I am using filedialog.askopenfile()

, which works, but leaves a small unresponsive tk window that I would rather not have, because any attempt to interact with it crashes the kernel and needs to be restarted.

Does anyone have any solutions or alternatives? Thank.

+3


source to share


1 answer


This works great:



from tkinter import *

root = Tk()
root.withdraw()

filedialog.askopenfile()

      

+1


source







All Articles