Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Mac os choose file name
#1
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
Reply
#2
tkinter also has: askopenfilename

usage:
from tkinter import filedialog as fd

filename = fd.askopenfilename()
print(filename)
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Loop with choose Irv1n 5 3,241 Sep-16-2021, 09:31 PM
Last Post: deanhystad
  Choose an element from multidimensional array quest_ 2 2,649 Nov-25-2020, 12:59 AM
Last Post: quest_
  Need help implmenting if/else or case statements for option to choose file format. samlee916 1 2,020 Jul-22-2020, 06:06 PM
Last Post: Larz60+
  Choose your own adventure game noahc2004 2 2,583 Jun-26-2020, 02:06 PM
Last Post: DPaul
  Please help a newbie choose which programming language to learn. yeto 2 3,506 Feb-25-2019, 12:56 AM
Last Post: yeto
  User Input to Choose from Dictionary anelliaf 9 25,813 Mar-27-2018, 02:22 PM
Last Post: anelliaf
  Reasons to choose Python over C++? RandoomDude 62 45,500 May-03-2017, 05:29 PM
Last Post: micseydel
  Need a little more help in a Choose Your Own Adventure Program Goldberg291 13 18,525 Jan-31-2017, 08:33 AM
Last Post: Ofnuts

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020