Windows7ćpython2.7.8
import Tkinter
import tkFileDialog
dir = tkFileDialog.askdirectory()
When I want to see it, a blank window with the title "Tk" comes out meaninglessly. This window does not disappear even after selecting a folder The worst falls. It doesn't seem to happen on linux.
The following seems to be a workaround.
import Tkinter
import tkFileDialog
root = Tkinter.Tk()
root.withdraw()
dir = tkFileDialog.askdirectory()
root.destroy()
Recommended Posts