tkFileDialog.askopenfile() mac
JBB <[email protected]>
| Newsgroups | gmane.comp.python.tkinter |
|---|---|
| Message-ID | <[email protected]> |
Hello, I am attempting to use tkFileDialog.askopenfile(): 1) On my Mac OSX Mavericks w/ Python 2.7.8, Anaconda 2.0.1 (x86_64) the following code (found via web searches) crashes: from Tkinter import * import tkFileDialog root = Tk() root.withdraw() file = tkFileDialog.askopenfile(parent=root) - A file dialog opens, I can select a file and click the Open button or doubleclick the filename. The window freezes, the spinning rainbow ball comes up, and a Kernel restart is needed to close the window. This happens on iPython notebook as well as within the Spyder IDE. 2) I run the same distribution on a Linux VM on the same machine. There, it works fine. The variable 'file' contains the name of whichever file I've selected. As far as I know, my Mac Python distribution is up-to-date. Pointers to documentation or fixes appreciated. JBB