import tkinter as tk
from tkinter.filedialog import askopenfilename
root = tk.Tk()
# show askopenfilename dialog without the Tkinter window
root.withdraw()
# default is all file types
file_name = askopenfilename()
print(file_name)
this is the code i am trying to use in python that allows me to select a file and return whichever file i select. the program allows me to select a file but rather than open the document it shows the files path in the Python shell. how can i fix this? thanks