i'm working with the Tk module, to select files and get their path. After selecting file the Tk window doesn't close. It remains open even the code is over.
Before saying creating this post, i tried to put different solution(No duplicate):root.destroy();root.withdraw();root.quit()
But it doesn't works.
Here is the code:
from tkinter import filedialog
from tkinter import Tk
def get_path():
root = Tk()
root.filename = filedialog.askopenfilenames()
return (root.filename)
root.quit()
e=get_path()
print(e)
Thanks in advance for your help.