I try to make a tool that can merge multiple pdf file types, I use askopenfilenames method, select the files and when I print the files it looks like they are ordered alphabetically. Is there a way to save them in the order of selection? To prevent Python from ordering the files?
My code:
def select_file():
global file_names
file_names = askopenfilenames(title='Please select one (any) frame from your set of images.',
filetypes=[('Image Files', ['.jpeg', '.jpg', '.png', '.gif',
'.tiff', '.tif', '.bmp'])])
for file in list(file_names):
print(file)
pdflabel = tk.Label(convertFrame, text=file, bg='#F3F6F6', fg='black')
pdflabel.pack()
Thanks.