askopenfilename?????

John Hunter jdhunter at nitace.bsd.uchicago.edu
Wed Jul 10 13:31:50 EDT 2002


>>>>> "jubafre" == jubafre  <jubafre at zipmail.com.br> writes:

    jubafre> i don´t know how to use a filetypes option of
    jubafre> askopenfilename, somebody can help?


    jubafre> askopenfilename(filetypes=???)

I don't use tkinter, but I believe the way this works is you present a
list of tuples, where the first element of each tuple is a name
associated with some filename glob to show only files of a certain
type, eg

self.picname = askopenfilename(
   filetypes = [ ("JPEG", "*.jpg"), ("GIF", "*.gif"), ("All", "*.*") ]
   )

John Hunter






More information about the Python-list mailing list