Python Forum

Full Version: Mac os choose file name
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I would like, on Mac Os, to invoke code that presents the user with a dialog (panel) to navigate directories/folders and choose a file. I believe the os supports something like "nsopenpanel" but have not located how to use that in a python program
tkinter also has: askopenfilename

usage:
from tkinter import filedialog as fd

filename = fd.askopenfilename()
print(filename)