I\'m trying to get a list of filenames from tkinter.filedialog.askopenfilenames() in Python 3.2.
files = askopenfilenames(initialdir=\"C:\\\\Users\\\\BVC
I just found this question when looking up why I was getting curly brackets instead of a proper list.
Here's my work around:
file_list=[]
files = files = askopenfilenames(initialdir="C:\\Users\\BVCAP\\Videos", title="Select files")
for file in files:
file_list.append(file)
I noticed that when I was using the askopenfilenames in my method I never looked at the object returned. I had treated it as a tuple and it worked fine. So knowing it could be iterated in a for loop, it made sense to append each item into a new blank list.
I hope this helps anyone else who encounters this bug.