tkFileDialog question

Matt Mitchell mmitchell at
Fri Nov 13 15:32:37 CET 2009


This is my first attempt to write a script with any kind of gui.   All I
need the script to do is ask the user for a directory and then do stuff
with the files in that directory.  I used tkFileDialog.askdirectory().
It works great but it pops up an empty tk window.  Is there any way to
prevent the empty tk window from popping up? Here's the code:

import tkFileDialog

answer = tkFileDialog.askdirectory()

if answer is not '':
	#do stuff


More information about the Python-list mailing list