python how to askopenfilename for multiple files

Solutions on MaxInterview for python how to askopenfilename for multiple files by the best coders in the world

showing results for - "python how to askopenfilename for multiple files"
Lilou
28 Nov 2018
1#So, you now how to do askopenfilename, the plural of it is askopenfilenames lol
2#Super cliche ikr. But yeah that is it, instead of askopenfilename do askopenfilenames
3import Tkinter
4
5root = tk.Tk()
6files = fd.askopenfilenames([the stuff you need])
7
8#It is important to point out that it stores them in a tuple 
9#So, if you need to do something to each individual file, do a for loop
10#Example:
11
12import Tkinter
13
14root = tk.Tk()
15root.geomotry=("400x400")
16root.title=("Image file sayer")
17
18images = fd.askopenfilenames(text = "Select an image my guy").place(x=120, y=120)
19
20for image in images:
21  if image.endswith(".jpg"):
22		print("This image is a jpeg my guy!")
23
24#Good luck to my future software engineers!