Hi all
I have written a python program which uses the Tkinter function tkFileDialog.askopenfilename . One of the options for this function is "filetypes". I use it this way:
tkFileDialog.askopenfilename ( filetypes = [('Text files','*.txt'),('All files','*')] )
On my Windows machine, it works fine. By default, the file dialog displays only ".txt" files. But the user has the option to display "All" files with a drop-down filetype menu.
But on a Macintosh, only the Text files are displayed in the file dialog, and there is NO option to display "All" file types. The user is then unable to open any files which do NOT have the extension ".txt"
According to documentation I found online, if the platform does not support the "listbox" in the file selection popup, then ALL files would be displayed instead. At least that is how I interpret it:
"if the File types listbox is not supported by the particular platform then all files are listed regardless of their types"
But that's not happening for me. Is this a Tkinter bug? Or do you know what is going on?
Thank You
Emma
I have written a python program which uses the Tkinter function tkFileDialog.askopenfilename . One of the options for this function is "filetypes". I use it this way:
tkFileDialog.askopenfilename ( filetypes = [('Text files','*.txt'),('All files','*')] )
On my Windows machine, it works fine. By default, the file dialog displays only ".txt" files. But the user has the option to display "All" files with a drop-down filetype menu.
But on a Macintosh, only the Text files are displayed in the file dialog, and there is NO option to display "All" file types. The user is then unable to open any files which do NOT have the extension ".txt"
According to documentation I found online, if the platform does not support the "listbox" in the file selection popup, then ALL files would be displayed instead. At least that is how I interpret it:
"if the File types listbox is not supported by the particular platform then all files are listed regardless of their types"
But that's not happening for me. Is this a Tkinter bug? Or do you know what is going on?
Thank You
Emma