how to select a file in python

Solutions on MaxInterview for how to select a file in python by the best coders in the world

we are a community of more than 2 million smartest coders
registration for
employee referral programs
are now open
get referred to google, amazon, flipkart and more
register now
  
pinned-register now
showing results for - "how to select a file in python"
Lola
11 Jul 2018
1Simple way to get a directory of a file and open it:
2  
3from tkinter.filedialog import askopenfilename
4
5filename = askopenfilename()