how to use dynamic modules with file browser? how to use dynamic modules with file browser? tkinter tkinter

how to use dynamic modules with file browser?


os.path includes everything you need.

from tkinter import Tkfrom tkinter.filedialog import askopenfilenamefrom os.path import basename, splitextTk().withdraw()path = askopenfilename()file = basename(path)(filename, fileextension) = splitext(file)print(filename)