Ahha! I know how to reproduce this! I was starting to think it was the Eclipse IDE but I did a reboot and ran from the windows console to make sure it wasn't
to repeat: 1) Right after reboot, I opened a window console, did a cd to my python directory and entered "python <mytestcodemodulename>.py" to open the ui window 2) click the browse button - file browser opens with my list of .csv files 4) here is the trick - DOUBLE click the file you want in the list. - with the double click you don't need to click the Open button, the double clicked file is entered in Entry field and tkfiledialog window closes 5) click the Browse button in the UI again and here is where I get some different behaviors. Some times after clicking the browse button the second time, I can wait, (for me it took about 15 seconds), and then the root window is destroyed. Other times, the root window is destroyed immediately, other times I need to do the browse, double click, browse, double click three or four times. But seems that I can consistently repeat this with at max four of these browse, double click cycles. It seems that all I have to do is have one double click in the tkfiledialog to kill my whole app. Can anyone else reproduce this? Thanks again. Fredrik Lundh wrote: > > mopman wrote: > >> I'm using python tkinter to create a GUI. I wish to collect 4 files from >> a >> user so for this part I created a GUI that has a Label, Entry and >> Button. >> To get the file I use tkFileDialog askopenfilename. My problem is that >> after a few file selections using the tkFileDialog, the root window is >> destroyed (the whole program just dissappears). >> >> I have created a simpler example and was able to reproduce the same thing >> with this. I've just started using tkinter so I have no idea what I may >> be >> doing wrong. If anyone has any ideas please let me know. > > I don't have Pmw on this machine, but if I comment out the "import Pmw" > line, the program works perfectly fine for me (Python 2.4.3, XP, running > from the command prompt). > > - do you still get the same problem if you remove the Pmw import ? > > - how do you run the program ? > > </F> > > _______________________________________________ > Tkinter-discuss mailing list > [email protected] > http://mail.python.org/mailman/listinfo/tkinter-discuss > > -- View this message in context: http://www.nabble.com/tkFileDialog%3A-shuts-down-root-window-tf2863117.html#a8015842 Sent from the Python - tkinter-discuss mailing list archive at Nabble.com. _______________________________________________ Tkinter-discuss mailing list [email protected] http://mail.python.org/mailman/listinfo/tkinter-discuss
