askopenfilename filetypes problem

Discussion in 'Python' started by embirath, Jul 2, 2010.

  1. embirath

    embirath

    Joined:
    Jul 2, 2010
    Messages:
    1
    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
    embirath, Jul 2, 2010
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Justin Straube
    Replies:
    2
    Views:
    1,149
  2. justin.vanwinkle@gmail.com

    Filetypes in email attachments.

    justin.vanwinkle@gmail.com, Aug 25, 2005, in forum: Python
    Replies:
    1
    Views:
    287
    =?ISO-8859-1?Q?=22Martin_v=2E_L=F6wis=22?=
    Aug 25, 2005
  3. royG
    Replies:
    11
    Views:
    491
    Tim Chase
    Mar 11, 2008
  4. Bradley Hintze

    argparse and filetypes

    Bradley Hintze, Mar 22, 2011, in forum: Python
    Replies:
    2
    Views:
    1,349
    Alex Willmer
    Mar 22, 2011
  5. Brandon
    Replies:
    2
    Views:
    164
    Jevon
    Jan 18, 2006
Loading...

Share This Page