[Tutor] [Tkinter-discuss] tkinter file dialog pattern matching (fwd)

Laura Creighton lac at openend.se
Sun Aug 23 17:11:32 CEST 2015

But, aha, it works for Python3.5

I wrote this minimal program, to see what needed doing to solve the OP's
problem, and, surprise, it solves it right out of the box.

# -*- coding: utf-8 -*-

from tkinter import *
import tkinter.tix as tix

root = tix.Tk()

def print_selected(args):
    print('selected dir:', args)

def pathSelect():
    d = tix.ExFileSelectDialog(master=root, command=print_selected)

button = Button(root, text="dialog", command=pathSelect)


shows my .files or not depending on whether I check the checkbox.

Now , of course I have gotten greedy and want a way to say 'show
me everything but the images' and 'show me everythingbut the .pyc files'


More information about the Tutor mailing list