Tkinter FileDialog

A

Alex van der Spek

Trying to bring up a simple File or Directory chooser using Tkinter. Right
now I use pywin32 as Mark Hammond's extensions are somewhat more familiar
to an (ex)VB programmer who started way back with Fortran.

On Windows Vista with Python 2.7. The examples from Mark Lutz' book
"Programming Python" do not immediately apply. The book describes Python 3.x
only.

This is what I do (in IDLE):

import tkFileDialog as tk
file2open=tk.Open().show()

This works. But it also brings up a persistent Tk window. Killing this
window forces a restart in IDLE, which is not desirable. There does not
appear to be a way to multiselect files?

I am probably missing a whole lot. Please point me to a simple example of
GUI file manipulations. I can save myself with os.path.walk and os.listdir
but the users I try to serve cannot.

Regards,
Alex van der Spek
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,756
Messages
2,569,535
Members
45,008
Latest member
obedient dusk

Latest Threads

Top