import sys from Tkinter import * from FileDialog import * root = Tk() filename = LoadFileDialog(root).go("~/gallery","*.xyz") print filename