Reputation: 1993
I'm unable to select multiple files using tkinter's askopenfilenames
on linux. I can select multiple files on windows but not on linux.
path = list(askopenfilenames(filetypes=('Images','*.jpg *.jpeg *.png')))
Upvotes: 1
Views: 1150
Reputation: 7006
The following code will allow you to select multiple files. You need to hold Control or Shift as you select each file
import tkinter as tk
from tkinter import filedialog
root = tk.Tk()
root.withdraw()
path = list(filedialog.askopenfilenames(filetypes=[('Images','*.jpg *.jpeg *.png')]))
print(path)
Upvotes: 0