code/media_lib.py
def prompt_file():
    """Create a Tk file dialog and cleanup when finished"""
    top = tkinter.Tk()
    top.withdraw()  # hide window
    file_name = tkinter.filedialog.askopenfilename(parent=top)
    top.destroy()
    return file_name
Create a Tk file dialog and cleanup when finished
Create a Tk file dialog and cleanup when finished
Create a Tk file dialog and cleanup when finished
def prompt_file():
    top = tkinter.Tk()
    top.withdraw()  
    file_name = tkinter.filedialog.askopenfilename(parent=top)
    top.destroy()
    return file_name
def prompt_file ( ) : top = tkinter . Tk ( ) top . withdraw ( ) file_name = tkinter . filedialog . askopenfilename ( parent = top ) top . destroy ( ) return file_name
Create a Tk file dialog and cleanup when finished
Create a Tk file dialog and cleanup when finished
"""Create a Tk file dialog and cleanup when finished""" # hide window