Tkinter file dialog

Hendrik van Rooyen mail at
Fri May 29 07:00:07 EDT 2009

 Ronn Ross  wrote:

>I'm using Tkinter file selector to get a direcotry path. I'm using:
>self.file = tkFileDialog.askdirectory(title="Please select your directory")
>        print file
>but all it prints out is:
><type 'file'>
>How would I print the directory path?

try doing:

self.filename = tkFileDialog.askopenfilename(title = 'this is a
message',initialdir='./' )

and see what happens

- Hendrik

More information about the Python-list mailing list