tkFileDialog and Multiple Filetypes
Fredrik Lundh
fredrik at pythonware.com
Sat Sep 22 08:05:49 EDT 2001
"Brian" <brian.smith at thr.ca> wrote:
> I haven't been able to turn up an example of specifying more than one
> file type per line.e.g
>
> n=askopenfilename(filetypes=[("Image Files","*.jpg;*.gif"),
> ("JPEG",'*.jpg'),
> ("GIF",'*.gif'),
> ('All','*')])
use a tuple:
filetypes = [
("Image Files", ("*.jpg", "*.gif")),
("JPEG",'*.jpg'),
("GIF",'*.gif'),
('All','*')
]
</F>
<!-- (the eff-bot guide to) the python standard library:
http://www.pythonware.com/people/fredrik/librarybook.htm
-->
More information about the Python-list
mailing list