root = Tkinter.Tk()
dirname = tkFileDialog.askdirectory(parent=root, initialdir='/', title=
    'Please select a directory')
if len(dirname) > 0:
    pass
Browse a Windows directory GUI using Python 2.7