tkFileDialog question

Matt Mitchell mmitchell at transparent.com
Fri Nov 13 09:32:37 EST 2009


Hi,

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

Thanks!
Matt



More information about the Python-list mailing list