Axiom X11 wrote: > I am trying to write a dialog the opens a video file. > ... > What I want to do is have it show > > Video Files (*.avi;*.mpg;*.mpeg) > > This idea is hinted at on this page: > http://www.averdevelopment.com/python/EasyDialogs.html > But the example doesn't seem to work (or perhaps I don't understand > how to use it) > > When I tried it like this: > > file = EasyDialogs.AskFileForOpen(defaultLocation="c:\\", > typeList=(('C Files (*.c, *.h)', '*.c;*.h')))
Ah, you got trapped by perhaps the greatest Python syntax trap. What you have given to typeList is NOT a tuple of tuples: the outer set of parentheses are interpreted as grouping parens and are discarded. You have it a list with two entries, which is what it displayed. Try this: file = EasyDialogs.AskForFileOpen( defaultLocation="c:\\", typeList=( ('Video Files (*.avi,*.mpg,*.mpeg)', '*.avi;*.mpg;*.mpeg'), ) ) Notice the extra comma inside the outer parens. That's the key. -- Tim Roberts, [EMAIL PROTECTED] Providenza & Boekelheide, Inc. _______________________________________________ Python-win32 mailing list Python-win32@python.org http://mail.python.org/mailman/listinfo/python-win32